The REDEFINE statement lets you define subfields of larger fields. Put REDEFINE statements near the beginning of your control file.
REDEFINE "Parms".
Parms:
fldname1 IN fldname2 [START nnn] {LENGTH nnn | END nnn} [[DISPLAY ‘dcon’] TYPE tcon] [HEADING | heading ...]
- fldname1
Indicates the name of the new subfield. - fldname2
Indicates the name of the redefined field. - START nnn
Indicates the starting position of fldname1 in fldname2. The first available position is 1. This is the default. - LENGTH nnn
Indicates the length of the subfield. You must use either the END parameter or the LENGTH parameter. You cannot use both. - END nnn
Indicates the ending position of the subfield in fldname2. - DISPLAY 'dcon'
Sets the subfield's print format. If you specify the TYPE BIT parameter, the only accepted DISPLAY 'dcon' value is an even number of x's (for example, DISPLAY 'xxxx'). For more information, see the section DEFINE Statement. - TYPE tcon
Specifies the input data type. See the section DEFINE Statement for details. - HEADING
Indicates that it is to be used if you want to use the field name (fldname) as the column heading in the report. This is the default. - heading
Specifies literal values to use for the column heading instead of the subfield name. Column headings are left justified for alphanumeric fields and right justified for all other data types. Literal values are enclosed in quotes.
Examples
This statement redefines the first three positions of the ACCOUNT field as ACCT1. The new field has a five-position numeric value and contains packed decimal data. The column heading for this field is USERS.
REDEFINE ACCT1 IN ACCOUNT START 1 LENGTH 3
DISPLAY '99,999' TYPE P/D 'USERS'.This statement redefines the fourth position to the eighth position of the ACCOUNT field as NAME. The new field contains alphanumeric data. The column heading for this field is NAME.
REDEFINE NAME IN ACCOUNT START 4 END 8 TYPE A/N HEADING.