View previous topic :: View next topic
|
Author |
Message |
sahana.chandan.gupta
New User
Joined: 05 Dec 2007 Posts: 10 Location: Mysore
|
|
|
|
Is there any command in Cobol to convert a sentence with lower cases into upper cases ? Please explain with example. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Sahana,
Use UPPER-CASE. For syntax, go thru manuals. |
|
Back to top |
|
|
socker_dad
Active User
Joined: 05 Dec 2006 Posts: 177 Location: Seattle, WA
|
|
|
|
Or if you are using TSO/ISPF you can issue either of the following commands:
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 |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
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 |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 631 Location: Wisconsin
|
|
|
|
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 |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
my last post in this thread, this is the topic title:
Lower Case to Upper case in cobol |
|
Back to top |
|
|
skkp2006
New User
Joined: 14 Jul 2006 Posts: 93 Location: Chennai,India
|
|
|
|
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 |
|
|
sahana.chandan.gupta
New User
Joined: 05 Dec 2007 Posts: 10 Location: Mysore
|
|
|
|
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 |
|
|
|