FORTRAN-like Format Specifications (DATA LIST command)

The following rules apply to FORTRAN-like formats:

  • Data can be in either fixed or freefield format.
  • Column locations cannot be specified. The width of a variable is determined by the width portion (w) of the format specification. The width must specify the number of bytes in the widest value.
  • One format specification applies to only one variable. The format is specified in parentheses after the variable to which it applies. Alternatively, a variable list can be followed by an equal number of format specifications contained in one set of parentheses. When a number of consecutive variables have the same format, the number can be used as a multiplying factor preceding the format. For example, (3F5.2) assigns the format F5.2 to three consecutive variables.
  • For fixed data, the number of formats specified (either explicitly or implied by the multiplication factor) must be the same as the number of variables. Otherwise, the program issues an error message. If no formats are specified, all variables have the default format F8.2.
  • For freefield data, variables with no specified formats take the default F8.2 format. However, an asterisk (*) must be used to indicate where the default format stops. Otherwise, the program tries to apply the next specified format to every variable before it and issues an error message if the number of formats specified is less than the number of variables.
  • For freefield data, width and decimal specifications are not used to read the data but are assigned as print and write formats for the variable.
  • For fixed data, Tn can be used before a format to indicate that the variable begins at the nth column, and nX can be used to skip n columns before reading the variable. When Tn is specified, variables named do not have to follow the order of the variables in the data.
  • For freefield data, variables are located according to the sequence in which they are named on DATA LIST. The order of variables on DATA LIST must correspond to the order of variables in the data.
  • To include decimal positions in the format for fixed-format data, specify the total width followed by a decimal point and the number of decimal positions. For example, (DOLLAR5) specifies a five-column DOLLAR format without decimal positions, and (DOLLAR5.2) specifies a five-column DOLLAR format, two columns of which are decimal positions.