guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi MK,
Please find an example for this
Code: |
//STEP001 EXEC PGM=SORT
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR
//SORTWK01 DD SPACE=(CYL,(100)),UNIT=DISK
//SYSIN DD *
OPTION COPY
OUTFIL OUTREC=(1:1,4,
5:5,3,CHANGE=(3,C'123',C'A01'),NOMATCH=(5,3),
8:8,73)
/*
//SORTIN DD DSN=TBH2.SCHNOMTC.SORTIN.DATA,DISP=SHR
//SORTOUT DD DSN=TBH2.SCHNOMTC.SORTOUT.DATA,
// UNIT=DISK,SPACE=(TRK,(1,1),RLSE),DISP=(,CATLG,DELETE),
// DCB=(LRECL=80,BLKSIZE=800,RECFM=FB)
//SYSOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//STATOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=* |
Here the output file contain first 4 byte of i/p file then from 5 th to 7 byte it will contain A01 if i/p file contain 123 otherwise the value of i/p file from 5th to 7 byte then from 8th to 80 byte again it will be containg value of 8th to 80 th byte of i/p file.
Hope it will helpful |
|