Great to to start here…

The most confusing keywords of DFSORT. The words like OUTFIL, OUTREC, INREC and INCLUDE asked in many interviews.

My point is how to tell without confusion…

Read my tips here. Before you go into details read my first post here ( installment #1)

The rules to understand

DFSORT processes the OUTFIL statements after the INREC and OUTREC statements. Therefore, OUTFIL must refer to the reformatted records produced by OUTREC if specified, or to the reformatted records produced by INREC if it is specified without OUTREC.

You will learn about OUTFIL statements in Creating Multiple Output Data Sets and Reports.

Got It

Example to make you understand clearly….

The control statements below illustrate how the INREC and OUTREC statements affect the positions you specify for various other statements:

INREC FIELDS=(1:1,75,76:170,4,80:110,5)
OUTREC FIELDS=(1:1,75,85:76,4,BI,EDIT=($IT.TT),95:80,5)

How to differentiate

  • The INCLUDE and INREC statements refer to fields as they appear in the input records.
  • The SORT and OUTREC statements refer to fields as they appear in the reformatted INREC records.
  • The OUTFIL statements refer to fields as they appear in the reformatted OUTREC records.

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.

Comments are closed.