|
Using SORT INREC in JCL
Inputfile for SORT JCL
10 suresh 20000 01 20120203 34
20 NARENDRA 40000 06 20120925 AB
30 jacob A 25000 07 20111018 1A
40 RAMESH 34000 03 20120610 2C
50 Kishore 50000 02 20120408 45
INREC in SORT JCL
//SYSIN DD *
SORT FIELDS=COPY
INREC FIELDS=(1:1,35,60:SEQNUM,6,ZD)
/*
//* copyright www.mainframegurukul.com
Explanation - First 35 bytes will be copied to outputfile &
sequence number will be added at 60th position in the outputfile.
Outputfile from SORT JCL -
10 suresh 20000 01 20120203 34 000001...
20 NARENDRA 40000 06 20120925 AB 000002...
30 jacob A 25000 07 20111018 1A 000003...
40 RAMESH 34000 03 20120610 2C 000004...
50 Kishore 50000 02 20120408 45 000005...
******************************** Bottom of Data ********************
For complex INREC and OUTREC SORT JCLs. Refer below
discussion at mainframegurukul SORT forums.
Hexadecimal to decimal conversion - SORT JCL INREC OUTREC
SORT JCL - SORTING A VB FILE - INREC OUTREC PARSE BUILD
Sort jcl - report writer queries using OUTREC
|
|