How to create test files for SORT

 

Looking to learn SORT ? , you are definitely going to need some input files to test your SORT card , the good news is that you need to have to create them manually .

IBM provides you with a JCL which would create 3 test file with different kinds of data types that you would need for your sort job , in fact the DFSORT manual references these files in most of the examples given in its manual .

Just run the below JCL with the appropriate JOB card and user id and you have your files ready with data for testing your SORT card .

 

//ICEDCRE JOB A492,PROGRAMMER

//SAMPCOPY EXEC PGM=ICESAMP,PARM=(BOOKS)

//SYSPRINT DD SYSOUT=*

//SAMPLE DD DSN=userid.SORT.SAMPIN,DISP=(NEW,CATLG),

// SPACE=(TRK,(1,1),RLSE),

// DCB=(RECFM=FB,LRECL=173,BLKSIZE=1730),

// UNIT=SYSALLDA

//*

//ADD DD DSN=userid.SORT.SAMPADD,DISP=(NEW,CATLG),

// SPACE=(TRK,(1,1),RLSE),

// DCB=(RECFM=FB,LRECL=173,BLKSIZE=1730),

// UNIT=SYSALLDA

//*

//OUTPUT DD DSN=userid.SORT.SAMPOUT,DISP=(NEW,CATLG),

// SPACE=(TRK,(1,1),RLSE),

// DCB=(RECFM=FB,LRECL=173,BLKSIZE=1730),

// UNIT=SYSALLDA

//*

//BRANCH DD DSN=userid.SORT.BRANCH,DISP=(NEW,CATLG),

// SPACE=(TRK,(1,1),RLSE),

// DCB=(RECFM=FB,LRECL=33,BLKSIZE=330),

// UNIT=SYSALLDA

//*

//SYSIN DD DUMMY

SAMPOUT and SAMPADD files have the below layout

Screen Shot 2015-04-02 at 10.06.12 PM

 

 

 

 

 

BRANCH file has the below layout

Screen Shot 2015-04-02 at 10.06.37 PM

 

 

 

Happy Sorting 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

Mainframe Wiki © 2015 Frontier Theme