nitesh.mulay
New User
Joined: 30 May 2006 Posts: 10 Location: Pune
|
|
|
|
I Have a file of record length 211. The 211th column has one of the four characters values (R,M,C,S) .
In the O/P file which has a record length of 212 , I want to move '1' for char R, '2' for Char M , '3' for char C & '4' for char S in the 212th column of the O/P Fiel . Can it be done.
If this is not possible can I Replace the 211th Column for the above values. |
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
nitesh.mulay,
This might help you.
Code: |
//STEP01 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN= Input -- FB/211
//SORTOUT DD DSN= Output -- FB/212
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=(211,1,CH,EQ,C'R'),OVERLAY=(212:C'1')),
IFTHEN=(WHEN=(211,1,CH,EQ,C'M'),OVERLAY=(212:C'2')),
IFTHEN=(WHEN=(211,1,CH,EQ,C'C'),OVERLAY=(212:C'3')),
IFTHEN=(WHEN=(211,1,CH,EQ,C'S'),OVERLAY=(212:C'4'))
/* |
|
|