JCL: DFSORT, IFTHEN, Overlay,When,HIT

You can use DFSORT as a reporting tool. The below are useful ideas on DFSORT on how to use its popular parameters.

dfosrt tricky questions

Example DFSORT..

//SYSIN     DD     *
INREC  IFTHEN =(WHEN=(10,1,CH,EQ'C'),OVERLAY(10:C'+'),HIT=NEXT),
IFTHEN=(WHEN=(27,1,CH,EQ'C'),OVERLAY(27:C'+'),HIT=NEXT),
and so on
SORT FIELDS=COPY
OUTREC FIELDS=(1,3122)
//
Note: HIT=NEXT, tells that to process next IFTHEN

Recent 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.

Comments are closed.