View previous topic :: View next topic
|
Author |
Message |
pankaj.mishra@gs.com
New User
Joined: 06 Dec 2005 Posts: 3
|
|
|
|
I need to convert lower case letter to upper case in my cobol program. Can any tell me how to do this. I tried function upper-case but i am getting compiler error. |
|
Back to top |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
hi frnd,
Code: |
01 Item-1 Pic x(30) Value ?Hello World!?.
01 Item-2 Pic x(30).
|
. . .
Quote: |
Display Item-1
Display Function Upper-case(Item-1)
Display Function Lower-case(Item-1)
Move Function Upper-case(Item-1) to Item-2
Display Item-2 |
The code above displays the following messages on the system logical output device:
Hello World!
HELLO WORLD!
hello world!
HELLO WORLD! |
|
Back to top |
|
|
pankaj.mishra@gs.com
New User
Joined: 06 Dec 2005 Posts: 3
|
|
|
|
same thing i tried in my program but i got compilation error. Looks like this function is compiler dependent. Please suggest me any other way if you know. |
|
Back to top |
|
|
akashs
New User
Joined: 24 Nov 2005 Posts: 49 Location: chennai
|
|
|
|
try out with INSPECT CONVERTING syntax
regards,
akash |
|
Back to top |
|
|
ajaya.rout
New User
Joined: 06 Dec 2005 Posts: 1
|
|
|
|
Hope this will work.
INSPECT desired-text-to-convert-into-uppercase
CONVERTING "abcdefghijklmnopqrstuvwxyz"
TO "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
Rgds/AR |
|
Back to top |
|
|
pankaj.mishra@gs.com
New User
Joined: 06 Dec 2005 Posts: 3
|
|
|
|
Thanks a lot. It works. |
|
Back to top |
|
|
|