Previous Topic: DEFINE Command—Define ID Options and VariablesNext Topic: DEFINE ID—Define Options Using Existing ID Options


DEFINE XID, XVAR—Define New ID Options or Variables

Defining new ID options or variables without using existing ID options or variables lets you report on any data field located in any supported record.

Use the following syntax to define new ID options or variables without using existing ID options or variables.

The syntax is shown with a continuation comma at the end of the first line.

DEFINE XID|XVAR name PRODUCT=EXPC RECORD=rectype,
                [SUBTYPE=subtype] OFFSET=data-offset
                LENGTH=data-length,[TRIPLET=triplet-offset]
                [TYPE=data-type][HDR1=header1] [HDR2=header2]
                [MIN | MAX] [FORMAT(outputformat)]
XID

Requests the definition of a new ID option.

XVAR

Requests the definition of a new variable.

name

Specifies the name of the new ID option or variable being created. For DEFINE XID commands, name must be a single word.

Note: For DEFINE XVAR commands, name must conform to the structure described at the beginning of the chapter “Variables.”

PRODUCT

Identifies the product for which an ID option or variable is being defined. You can omit this operand if you use the PRODUCT operand on the OPTION command.

rectype

Specifies the record type. To specify a value in hexadecimal, prefix the value with the letter x, for example, RECORD=x3C. You can omit this operand if you use the RECORD operand of the OPTION command.

subtype

Specifies the record subtype.

data-offset

Specifies the offset to the data field from the beginning of the section. To specify a value in hexadecimal, prefix the value with the letter x, for example, OFFSET=x3C.

data-length

Specifies the length of the data field. If you specify an XVAR with a type of BINARY, 3DEC, 6DEC, or NUMERIC, the maximum length is 8 bytes.

Note: Character-type variables have no length restriction.

triplet-offset

Specifies the offset from the beginning of the section to the triplet information. To specify a value in hexadecimal, prefix the value with the letter x, for example, TRIPLET=x3C.

data-type

Specifies data types for the DEFINE XID or DEFINE XVAR commands.

header1

Specifies a string of up to eight characters to be used as the top column heading.

Default: Null string

header2

Specifies a string of up to eight characters to be used as the bottom column heading.

Default: Null string

MIN|MAX

Use the MAX and MIN options to force a new variable that by default prints a count to print the minimum or maximum value.

FORMAT

Use the FORMAT option to define the length of an output field or to specify how many decimal positions it contains.

Note: For a description of output format, see the chapter "Variable Options."