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

Lower Case to Upper case in cobol


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 1436
Location: Bangalore,India

PostPosted: Wed Jan 09, 2008 12:21 pm
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: 177
Location: Seattle, WA

PostPosted: Thu Jan 10, 2008 1:57 am
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top