IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

converting lower case to upper case


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pankaj.mishra@gs.com

New User


Joined: 06 Dec 2005
Posts: 3

PostPosted: Tue Dec 06, 2005 3:10 pm
Reply with quote

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
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Tue Dec 06, 2005 3:17 pm
Reply with quote

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
View user's profile Send private message
pankaj.mishra@gs.com

New User


Joined: 06 Dec 2005
Posts: 3

PostPosted: Tue Dec 06, 2005 3:22 pm
Reply with quote

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
View user's profile Send private message
akashs

New User


Joined: 24 Nov 2005
Posts: 49
Location: chennai

PostPosted: Tue Dec 06, 2005 4:32 pm
Reply with quote

try out with INSPECT CONVERTING syntax
regards,
akash
Back to top
View user's profile Send private message
ajaya.rout

New User


Joined: 06 Dec 2005
Posts: 1

PostPosted: Tue Dec 06, 2005 4:35 pm
Reply with quote

Hope this will work.
INSPECT desired-text-to-convert-into-uppercase
CONVERTING "abcdefghijklmnopqrstuvwxyz"
TO "ABCDEFGHIJKLMNOPQRSTUVWXYZ".

Rgds/AR
Back to top
View user's profile Send private message
pankaj.mishra@gs.com

New User


Joined: 06 Dec 2005
Posts: 3

PostPosted: Tue Dec 06, 2005 4:45 pm
Reply with quote

Thanks a lot. It works.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Zunit Test case editor error Testing & Performance 4
No new posts Converting fixed length file to excel... IBM Tools 7
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
Search our Forums:

Back to Top