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 XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts RFE: DB2 support for mixed case names. Pedro DB2 0 Tue Jul 04, 2017 1:32 am
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am


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