Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
converting lower case to upper case

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: converting lower case to upper case
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: 680
Location: NJ

PostPosted: Tue Dec 06, 2005 3:17 pm    Post subject: Case
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    Post subject:
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    Post subject: Re: converting lower case to upper case
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    Post subject: Re: converting lower case to upper case
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts RFE: DB2 support for mixed case names. Pedro DB2 0 Tue Jul 04, 2017 1:32 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts Summing on Mixed Case Literals Roy Ware SYNCSORT 3 Tue Jan 03, 2017 10:18 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us