//SYSIN DD *
SORT FIELDS=COPY
OUTFIL OUTREC=(1,4,5:(01,2,BI,ADD,+4),BI,LENGTH=2,2Z,1)
END
/*
What is the meaning of this SORT card?
input file attributes: SEQ,VB, LRECL 3704.
output file attributes: SEQ,VB, LRECL 3720.
I tested with 5 records in SORTIN and SYOUT=* as SORTOUT. the following error occurs. But it executes successfully in production with millions of records.
Code:
********************************* TOP OF DATA **********************************
ICE201I C RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE805I 1 JOBNAME: TESTJOB1 , STEPNAME: STEP0020
ICE802I 0 BLOCKSET TECHNIQUE IN CONTROL
ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5650-ZOS, Z/OS DFSORT V2R5 - 14:39 ON TUE SE
SORT FIELDS=COPY
OUTFIL OUTREC=(1,4,5:(01,2,BI,ADD,+4),BI,LENGTH=2,2Z,1)
END
ICE126A 9 INCONSISTENT REFORMATTING FOR SORTOUT : REASON CODE 02, IFTHEN 0
ICE751I 0 C5-I79519 C6-NONE C7-I76950 C8-I76518 E9-I96983 E7-I76950
ICE052I 3 END OF DFSORT
******************************** BOTTOM OF DATA ********************************
I created the i/p and o/p files with correct attributes. It runs successfully. The input data is right shifted by 8 positions and written in the output file. The first eight positions are filled with low values; but, they are not equal. I know that filling logic is in the SORT card, but I don't understand it. Please expain.
i/p:
Code:
----+----1----+----2----+----3----+----4----+----5
***************************** Top of Data ********
12345678901234567890
ABCDEFGHIJ1234567890ABCDEFGHIJ1234567890
**************************** Bottom of Data ******
o/p:
Code:
Thanks.
----+----1----+----2----+----3----+----4----+----5
***************************** Top of Data ********
12345678901234567890
ABCDEFGHIJ1234567890ABCDEFGHIJ1234567890
**************************** Bottom of Data ******
o/p with hex on:
Code:
----+----1----+----2----+----3----+----4----+----5
***************************** Top of Data ********
12345678901234567890
01000100FFFFFFFFFFFFFFFFFFFF4444444444444444444444
0C000800123456789012345678900000000000000000000000
--------------------------------------------------
ABCDEFGHIJ1234567890ABCDEFGHIJ1234567890
03000200CCCCCCCCCDFFFFFFFFFFCCCCCCCCCDFFFFFFFFFF44
00000C00123456789112345678901234567891123456789000
--------------------------------------------------
**************************** Bottom of Data ******