RECORD Subcommand (FILE TYPE-END FILE TYPE command)

RECORD specifies the name and column location of the record identification variable.

  • The column location of the record identifier is required. The variable name is optional.
  • If you do not want to save the record type variable, you can assign a scratch variable name by using the # character as the first character of the name. If a variable name is not specified on RECORD, the record identifier is defined as the scratch variable ####RECD.
  • The value of the identifier for each record type must be unique and must be in the same location on all records. However, records do not have to be sorted according to type.
  • A column-style format can be specified for the record identifier. For example, the following two specifications are valid:
RECORD=V1 1-2(N)
RECORD=V1 1-2(F,1)

FORTRAN-like formats cannot be used because the column location must be specified explicitly.

  • Specify A in parentheses after the column location to define the record type variable as a string variable.

Example

FILE TYPE  MIXED FILE='/data/treatmnt.txt' RECORD=RECID 1-2.
  • The record identifier is variable RECID, located in columns 1 and 2 of the hospital treatment data file.