SrinimfJOBS|IT Jobs USAINREC and OUTREC are the two important parameters we used in Sort.

INREC ==> Reformatted input record. We do not take complete record.We only take part of the record.

OUTREC=>Reformatted output record.This contains what are the input fields(in the sorted input) will have in the output file.

General Syntax:

INREC  FIELDS=([c:][separation-fld,]position,length…)
OUTREC FIELDS=([c:][separation-fld,]position,length)

c:Specifies the column (byte) in which a data field or separation field should be placed, relative to the start of the record. If the column settings that are coded skip over any bytes, those bytes are filled with spaces.

Separation fld: Tells the sort/merge utility to insert a constant value into the record. The constant can be specified in one of these forms:

Nx: Inserts n repetitions of spaces

Nz: Inserts n repetitions of binary zeros

Nc’text’: Inserts n repetitions of the specified text

NX’hex’: Inserts n repetitions of the specified hex value

If n is omitted, one repetition of the specified constant is inserted.

IBM example-Check here.


One thought on “DFSORT-INREC And OUTREC An Example

  1. Pingback: JCL- Sort Overlay – Srinimf

Comments are closed.