DFSORT OUTREC lookup and change

DFSORT OUTREC: Date Operations DFSORT OUTREC: Justifying Data

Advertisements


OUTREC statement can be used to lookup and change the content in the file while sorting.

Syntax:
OUTREC FIELDS=(Starting position of field1, Length of field1, 
		CHANGE=(v,find,set,...),…)

Name Description
Starting position of field1Specifies field1 starting position in the input file after sorting.
Length of feild1Field1 physical length in input file.
VSpecifies the length of the output field
FindTable consisting pairs of find constants
SetSet constants or set fields

NOMATCH can be used to change if no match found with any of the constants in the table.

NOMATCH=(set) to set the output value when an input field valuedoes not match any of the find constants.

Syntax:
NOMATCH=(C'string') sets a characterstring constant. 
NOMATCH=(X'string') sets a hexadecimal string constant.
NOMATCH=(q,n) sets an input field value.

Note: If do notspecify NOMATCH=(set), DFSORT terminates with an error message when aninput field value does not match any of the find constants.


Example: - Will update soon


DFSORT OUTREC: Date Operations DFSORT OUTREC: Justifying Data

Advertisements