Previous Topic Next topic Print topic


FIELDS Instruction

A SORT or MERGE instruction must be followed by a FIELDS instruction which specifies the fields on which the input file is to be sorted or merged.

A fields instruction takes the following form:

fields({start,length,type,order},...)

where the parameters are:

Parameter Description
start The starting position of the field in the record, counting in bytes from 1
length The length of the field (bytes)
type The type of data in the field. See the section Field Types .
order The ordering of output, which can be either of: A - ascending D - descending

You can specify up to 100 fields by repeating the parameter set (start, length, type and order). Use commas to separate the parameters and the parameter sets.

Previous Topic Next topic Print topic