ILE RPG Language Reference
Input of Null-Capable Fields
For a field that is null-capable in the RPG program, the following
will apply on input, for DISK, SEQ, WORKSTN and SPECIAL files:
- When a null-capable field is read from an externally described
file, the null indicator for the field is set on if the field is null
in the record. Otherwise, the null indicator is set off.
- If field indicators are specified and the null-capable field is
null, all the field indicators will be set off.
- If a field is defined as null-capable in one file, and not null-capable
in another, then the field will be considered null-capable in the
RPG program. However, when you read the second file, the null indicator
associated with the field will always be set off.
- An input operation from a program-described file using a data
structure in the result field does not affect the null indicator associated
with the data structure or any of its subfields.
- Reading null-capable fields using input specifications for program-described
files always sets off the associated null indicators.
- If null-capable fields are not selected to be read due to a field-record-relation
indicator, the associated null indicator will not be changed.
- When a record format or file with null-capable fields
is used on an input operation (READ, READP, READE, READPE, CHAIN)
and a data structure is coded in the result field, the values of %NULLIND
for null-capable data structure subfields will be changed by the operation.
The values of %NULLIND will not be set for the input fields for the
file, unless the input fields happen to be the subfields used in the
input operation.
Null-capable fields cannot be used as match fields or control-level
fields.
[ Top of Page | Previous Page | Next Page | Contents |
Index ]