View previous topic :: View next topic
|
Author |
Message |
jackal Currently Banned New User
Joined: 21 Jan 2006 Posts: 48 Location: india
|
|
|
|
Hello All,
I want to display America instead of AMERICA, could u let me know this |
|
Back to top |
|
|
nuthan
Active User
Joined: 26 Sep 2005 Posts: 146 Location: Bangalore
|
|
|
|
INSPECT variable1 CONVERTING 'abcd....xyz' TO 'ABCD....XYZ' |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
Back to top |
|
|
shankar.v
Active User
Joined: 25 Jun 2007 Posts: 196 Location: Bangalore
|
|
|
|
jackal,
Please check with the following code for your requirement.
Code: |
IDENTIFICATION DIVISION.
PROGRAM-ID. B.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 WS-IN PIC X(80) VALUE SPACES.
77 WS-OUT PIC X(80) VALUE SPACES.
PROCEDURE DIVISION.
ACCEPT WS-IN
DISPLAY 'WS-IN ==> ' WS-IN
MOVE WS-IN(1:1) TO WS-OUT.
MOVE FUNCTION LOWER-CASE(WS-IN(2:)) TO WS-OUT(2:)
DISPLAY 'WS-OUT ==> ' WS-OUT
GOBACK. |
Input:
Output:
Code: |
WS-IN ==> AMERICA
WS-OUT ==> America |
|
|
Back to top |
|
|
shankar.v
Active User
Joined: 25 Jun 2007 Posts: 196 Location: Bangalore
|
|
|
|
jackal,
Please check with the following sort jcl for your requirement
Code: |
// EXEC PGM=SORT
//SORTIN DD *
AMERICA
/*
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC OVERLAY=(2:2,79,TRAN=(UTOL))
/*
// |
Output:
|
|
Back to top |
|
|
HARLEEN SINGH MANN Warnings : 2 New User
Joined: 03 Aug 2007 Posts: 17 Location: Pune
|
|
|
|
A simpler way to do this withour using "move function lower-case" is to
use CAPS OFF on the command line of the editor and move that string to ww-<output variable> and dispaly it.
ie. MOVE 'america' TO WW-1
DISPLAY WW-1 |
|
Back to top |
|
|
|