DFSORT INREC

DFSORT OUTREC: Inserting sequence numbers DFSORT INREC: Inserting sequence numbers

Advertisements


The INREC statement can reformat the records before sorting.

The INREC statement has the same format as the OUTREC statement.

INREC reformats the records before they are sorted.

The SORT and SUM statements refer to the reformatted records.

DFSORT processes the INREC statement before SORT, SUM, and OUTREC.

But INCLUDE and OMIT processed before INREC statement.

When used with the INREC statement, SORT, SUM, and OUTREC must refer to the reformatted records from INREC.

When used with the INREC statement, INCLUDE and OMIT must refer to the original records.

DFSORT processes the OUTFIL statements after the INREC and OUTREC statements.

OUTFIL must refer to the reformatted records produced by OUTREC/INREC if specified.

OVERFLOW can be prevented by using INREC as INREC will be processed before SUM statement execution.

OVERFLOW can be prevented by INREC to pad summary fields with zeroes.

Note: OUTREC can’t prevent overflow as it processed after summarization.


Example: - Will update soon


DFSORT OUTREC: Inserting sequence numbers DFSORT INREC: Inserting sequence numbers

Advertisements