Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

urgent help

Status
Not open for further replies.

gongura

Programmer
Oct 28, 2002
7
US
How do i change small letter to caps in cobol.
please can any body help!.

TIA
Gongura
 
gongura,

I believe you can just use inspect/converting:

INSPECT FIELD CONVERTING
'abcdefghijklmnopqrstuvwxyz' TO
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.

I know it can also be done with inspect/replacing, but I "think" you would have to do each letter individually-not sure, though, so if any of you experts know, jump in-lol
confusedlady
 
Hi confusedlady,

Thank you very much for your reply.I have used with function upper-case also.I hav eresolved the issue.

Gongura.
 
Hi Gongura,

If the function is intended to be used frequently in the pgm, I'd take both your approach and CL's approach and look at the generated assembler code or time each approach to determine which is faster.

To get the generated assembler language insructions listed in the compiler O/P, include options LIST,NOOFF as well as any others you may need.

I suspect that CL's would be more efficient, but a test would prove (or disprove) it.

Regards, Jack.
 
I believe INSPECT CONVERTING is an IBM extension to the standard. INSPECT REPLACING, which is standard, can do the same thing although with much more verbiage. Also, in either case, one must specifically define the character set to be converted.

The intrinsic function UPPER-CASE doesn't suffer from that limitation and is standard (although I believe the intrinsic functions are an optional part of the standard, they are widely implemented) and therefore the one I'd go with.

Glenn
Brainbench MVP for COBOL II
 
3gm,

I know you weren't answering any question I asked, but that was helpful info for me. Hope I remember next time I convert text case. Thanks! confusedlady
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top