Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Lower Case to Upper case in cobol

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sahana.chandan.gupta

New User


Joined: 05 Dec 2007
Posts: 10
Location: Mysore

PostPosted: Wed Jan 09, 2008 12:12 pm    Post subject: Lower Case to Upper case in cobol
Reply with quote

Is there any command in Cobol to convert a sentence with lower cases into upper cases ? Please explain with example.
Back to top
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Wed Jan 09, 2008 12:21 pm    Post subject:
Reply with quote

Sahana,

Use UPPER-CASE. For syntax, go thru manuals.
Back to top
View user's profile Send private message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 147
Location: Columbia, MO

PostPosted: Thu Jan 10, 2008 1:57 am    Post subject: Reply to: Lower Case to Upper case in cobol
Reply with quote

Or if you are using TSO/ISPF you can issue either of the following commands:

Code:
C ALL P'<' P'>'



Code:
CAPS ON

C ALL ' '   ' '


In the second example, there is a space between each of the pair of single quotes. And you must first issue the command CAPS ON to change your profile settings.
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Thu Jan 10, 2008 3:17 am    Post subject:
Reply with quote

and you can use the UC line command...but this is the cobol forum and the question is about upper case in cobol..

;)
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Thu Jan 10, 2008 3:48 am    Post subject:
Reply with quote

The OP wants to "convert a sentence" in cobol.

Sentence has a specific meaning in cobol. To quote a manual I have "A COBOL sentence is a syntactical unit within a paragraph, may span multiple line in Area B (Columns 12-72), and must end with a period followed by a space."

Also from IBM "One or more statements terminated by a separator period."


If the OP is talking about an English sentence in working storage then murmohk1 gave the Cobol statement that can be put into a Cobol sentence.

If however the OP is referring to an actual Cobol sentence then socker_dad and acevedo are correct.
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Thu Jan 10, 2008 12:44 pm    Post subject:
Reply with quote

my last post in this thread, this is the topic title:

Lower Case to Upper case in cobol
Back to top
View user's profile Send private message
skkp2006

New User


Joined: 14 Jul 2006
Posts: 93
Location: Chennai,India

PostPosted: Thu Jan 10, 2008 3:57 pm    Post subject: Reply to: Lower Case to Upper case in cobol
Reply with quote

In cobol...

1. Using INSPECT as follows
INSPECT string1 CONVERTING
"ABCDEFGHIJKLMNOPQRSTUVWXYZ” TO “abcdefghijklmnopqrstuvwxyz"

2. You can use Intrinsic function LOWER-CASE() as follows...
Move "UPPERCASE DATA" TO String1.
MOVE FUNCTION LOWER-CASE(String1) TO String2.
DISPLAY String2.

In Sort....

Use the below Syncsort/DFsort sort Card if the entire file or part of a file is to be changed

SORT FIELDS=COPY
OUTREC FIELDS=(1:1,10,TRAN=UTOL)


Syam
Back to top
View user's profile Send private message
sahana.chandan.gupta

New User


Joined: 05 Dec 2007
Posts: 10
Location: Mysore

PostPosted: Thu Jan 10, 2008 4:35 pm    Post subject: Re: Reply to: Lower Case to Upper case in cobol
Reply with quote

Thank u very much

skkp2006 wrote:
In cobol...

1. Using INSPECT as follows
INSPECT string1 CONVERTING
"ABCDEFGHIJKLMNOPQRSTUVWXYZ” TO “abcdefghijklmnopqrstuvwxyz"

2. You can use Intrinsic function LOWER-CASE() as follows...
Move "UPPERCASE DATA" TO String1.
MOVE FUNCTION LOWER-CASE(String1) TO String2.
DISPLAY String2.

In Sort....

Use the below Syncsort/DFsort sort Card if the entire file or part of a file is to be changed

SORT FIELDS=COPY
OUTREC FIELDS=(1:1,10,TRAN=UTOL)


Syam
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 SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us