How to ‘Sort’ Input dataset in JCL

Here is sample JCL to use ‘sort’ utility in JCL to sort input dataset. Also, you can write sorted records to output file.

On this page

  1. Sample JCL Sort Utility
  2. Related Posts
SORT JCL
SORT JCL

1. Sample JCL Sort Utility

//EXAMP   JOB A492,PROGRAMMER
//SORT    EXEC PGM=SORT
//SYSOUT  DD   SYSOUT=A
//SORTIN  DD   DSN=A123456.SORT.SAMPIN,DISP=SHR ==> Input file
//SORTOUT DD   DSN=A123456.SORT.SAMPOUT,DISP=OLD ==> Output file
//SYSIN DD *
  SORT FORMAT=CH,
  FIELDS=(110,10,A,145,17,A,1,75,A)
/*

2. Related Posts

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.