## 8.2.1 General Input Rules for FORMAT Statements

A minus sign must precede a negative value in an external field; a plus sign is optional before a positive value.

An external field under I field descriptor control must be an integer constant. It cannot contain a decimal point or an exponent.

An external field under O field descriptor control must contain only the numerals 0 through 7. An external field input under Z field descriptor control must contain only the numerals 0 through 9 and the letters A(a) through F(f). An external field under O or Z field descriptor control must not contain a sign, a decimal point, or an exponent. You cannot use octal and hexadecimal constants in the form '777'O, 'AF9'Z, or 'AF9'X in external records.

An external field under F, E, D, or G field descriptor control must be an integer constant or a real constant. It can contain a decimal point, an exponent field (E(e), D(d), or Q(q)), or both.

If an external field contains a decimal point, the actual size of the fractional part of the field, as indicated by that decimal point, overrides the d specification of the corresponding real field descriptor.

If an external field contains an exponent, the scale factor (if any) of the corresponding field descriptor is inoperative for the conversion of the field.

The field width specification must be large enough to accommodate both the numeric character string of the external field and any other characters that are allowed (algebraic sign, decimal point, exponent, or combination of the three).

A comma is the only character you can use as an external field separator. It terminates the input of fields (for noncharacter data types) that are shorter than the number of characters expected. It also designates null (zero-length) fields.

At the beginning of the execution of each formatted input statement, the BLANK attribute for the relevant logical unit determines the interpretation of spaces. Default values are as follows:

- On OpenVMS systems:

  - BLANK='NULL': When an explicit OPEN has been executed.

  - BLANK='ZERO': When no explicit open has been executed or an internal READ has been performed.

- On Tru64 UNIX systems, the default is BLANK='NULL' when an explicit OPEN has been executed, no explicit OPEN has been executed, or an internal READ has been performed.

To force spaces to be interpreted as nulls or zeros, add an explicit BN or BZ edit descriptor in the format used for internal READ (or DECODE) statements and formatted READs from files not explicitly opened.

Previous Page Next Page Table of Contents