Can (How to)we use both lower & upper case letters in cobol?

OS/VS COBOL, COBOL II, Enterprise COBOL for z/OS. OpenCOBOL and OOCobol.
Post Reply
Ramnath
Registered Member
Posts: 20
Joined: Thu Aug 01, 2013 6:57 pm

Can (How to)we use both lower & upper case letters in cobol?

Post by Ramnath »

Hi,

Can anyone let me know how to use the mix of both the lower and upper case letters in the cobol program? If we use CAPS ON it will type only CAPS and even if we keep the "caps lock" on and CAPS ON is not set in profile, all comes back to lower case. So is there any way to get around it?
User avatar
Marso
New Member
Posts: 2
Joined: Sun Jun 08, 2014 1:00 pm

Re: Can (How to)we use both lower & upper case letters in co

Post by Marso »

cobol (as well as COBOL) don't care if half the program is in uppercase and the other half in lowercase.
It may be important in the VALUE clauses and in literals (because 'y' is different from 'Y' for example).

When you edit a program, the editor will detect if there are lowercase characters in the file.
It will set the CAPS on or off depending on that.
You can change that default by entering CAPS ON or CAPS OFF in the command line.

If it is CAPS OFF, text will be left as you type it: upper or lower.
If it is CAPS ON, everything you type will be uppercased. If you modify a line with lowercase, the whole line will be uppercased.
I have never seen the editor changing from uppercase to lowercase on its own.

You can use UC and LC in the prefix area to convert a whole line.

Does that answer your question ?
Ramnath
Registered Member
Posts: 20
Joined: Thu Aug 01, 2013 6:57 pm

Re: Can (How to)we use both lower & upper case letters in co

Post by Ramnath »

I made use of line commands LC and UC frequently after your suggestion and this has helped in doing what I was after. Thank you.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.”