‎2006 Jun 27 8:06 PM
Does anyone know of a subroutine, function, etc. that will translate upper case text to title case?
‎2006 Jun 27 8:08 PM
hi jane,
check the fm <b>SWA_STRING_TO_UPPERCASE</b>
set this parameter PRESERVE_EXISTING_CAPITALS = SPACE
‎2006 Jun 27 8:07 PM
‎2006 Jun 27 8:07 PM
‎2006 Jun 27 8:08 PM
hi jane,
check the fm <b>SWA_STRING_TO_UPPERCASE</b>
set this parameter PRESERVE_EXISTING_CAPITALS = SPACE
‎2006 Jun 27 8:14 PM
Hi Priya,
I tried this and this is working for me. Thank you very much for the information.
Regards,
Ben.
‎2006 Jun 27 8:20 PM
Check out this sample program.
report zrich_0005.
data: str type string.
data: istr type table of string with header line.
data: xstr(50) type c.
data: output_string type string.
str = 'THIS IS THE TITLE OF THE REPORT'.
split str at ' ' into table istr.
loop at istr into xstr.
translate xstr to lower case.
translate xstr+0(1) to upper case.
istr = xstr.
modify istr.
endloop.
clear output_string.
loop at istr.
concatenate output_string istr into output_string separated by space.
endloop.
shift output_string left deleting leading space.
write:/ str.
write:/ output_string.
Regards,
Rich Heilman
‎2006 Jun 27 8:20 PM
Title case has the first letter of each word in upper case; remaining letters in lower case.
Example: Purdue University.
Jane
‎2006 Jun 27 8:23 PM
‎2006 Jun 28 8:07 PM
Thanks so much to everyone who replied. The colleague with this issue took Rich's code.
Jane Martin