FIELDS

Use the FIELDS keyword to specify the contents the output record written by the command function.

Extracted fields are in the output record in the order specified by the parameter that is coded on the FIELDS keyword.

When used on an OUTPUT subcommand within an EXTRACT command, this keyword specifies the content of the segment data records written to the extract file. When used on an OUTPUT subcommand within a CHANGE, UNLOAD, or RELOAD command, this keyword specifies the content of the database segments.

Note

When the FIELDS keyword is used with the OUTPUT subcommand to refer to the content of a compressed segment, you must specify EXPAND=YES on the primary command. This will ensure that the operands specified on the FIELDS keyword correspond to the proper segment columns.

Use

FIELDS is an optional keyword for the OUTPUT subcommand.

FIELDS is a required keyword (when used within a PREPARE command) on each of the OUTPUT subcommands for a segment if you modify the position or length of the symbolic key field.

FIELDS is a required keyword for the USER_RECORD subcommand.

Related keyword

EXPAND

Syntax

FIELDS=(expression[,...][,VL=YES/NO])

Parameters

The parameter consists of a list of one or moreexpressions, each of which defines a value to be placed in the output record. For details, see Expression syntax.

The values resulting from each expression in the parameter list are placed in the output area in the order specified. Unless otherwise directed by use of an explicit conversion operator, the format, size and precision of the value(s) is derived from the operands and operators used in the expression. For details, see Expression syntax.

The entire list of values resulting from the expression or expressions can be optionally prefixed with a 2-byte length indicator. Specify VL=YES as a subparameter on the FIELDS keyword to request a length prefix; specify VL=NO to suppress the length prefix.

Default

VL=NO will be used by default when running an EXTRACT command, unless EXTRACT_FORMAT=HDUNLOAD is selected.

When running a CHANGE, UNLOAD, or RELOAD command, or when running an EXTRACT command with EXTRACT_FORMAT=HDUNLOAD selected, VL=YES will be used by default for segments defined as variable length. VL=NO will be used by default for segments defined as fixed length.

Alias

None

Was this page helpful? Yes No Submitting... Thank you

Comments