DFSORT OUTREC Justifying Data

DFSORT OUTREC: lookup and change DFSORT OUTREC: squeezing Data

Advertisements


OUTREC statement can be used to justify the content in the file while sorting.

Syntax-1:
OPTION COPY
OUTREC FIELDS=(Starting position of field1, Length of field1,JFY=(SHIFT=LEFT/RIGHT,LEAD=charset,TRAIL=charset),…)

Name Description
Starting position of field1Specifies field1 starting position in the input file after sorting.
Length of feild1Field1 physical length in input file.
SHIFTSpecifies the justification
SHIFT=LEFT indicates that you want to left-justify
SHIFT=RIGHT indicates that you want to right-justify
LEAD=charset Specifies the leading characters/string adding to data
TRAIL=CharsetSpecifies the trailing characters/strings adding to data

Example: - Will update soon

Syntax-2:
OPTION COPY
OUTREC FIELDS=(Starting position of field1, Length of field1,JFY=(SHIFT=LEFT/RIGHT, PREBLANK=charset),…)

Name Description
Starting position of field1Specifies field1 starting position in the input file after sorting.
Length of feild1Field1 physical length in input file.
SHIFTSpecifies the justification
SHIFT=LEFT indicates that you want to left-justify
SHIFT=RIGHT indicates that you want to right-justify
PREBLANK=charsetSpecifies the characters that replaced or blank out as leading and trailing to data
PREBLANK=list specifies a list of characters to replace with blanksbefore DFSORT starts to justify the data.
The list can be specified as a character orhexadecimal constant (1 to 10 bytes).

Note: The each character in the list isindependent of the other characters.


Example: - Will update soon

Syntax-3:
OPTION COPY
OUTREC FIELDS=(Starting position of field1, Length of field1,
		JFY=(SHIFT=LEFT/RIGHT, PREBLANK=charset,LEAD=charset,TRAIL=charset),…)


DFSORT OUTREC: lookup and change DFSORT OUTREC: squeezing Data

Advertisements