Replacing missing fields

A missing field that is not replaced does not affect the physical variable-length segment.

The following figure is an example of a missing field on a replace call based on the DBD and PSB in Retrieving missing fields.

Figure 1. First example of a missing field on a replace call
Physical segment on disk has the fields LL, EMPNO, and EMPNAME. I/O area has EMPNAME, EMPNO, and ADDRESS. ADDRESS field is blank. Physical segment on disk after update is the same as before update.

The length field, maintained by IMS, does not include room for the address field, because the field was missing and not replaced.

On a replace call, if a field returned to the application program with a fill value is changed to a non-fill value, the segment length is increased to the minimum size needed to hold the modified field.

The following figure is an example of a missing field on a replace call based on the DBD and PSB in Retrieving missing fields.

Figure 2. Second example of a missing field on a replace call
Physical segment on disk has the fields LL, EMPNO, and EMPNAME. I/O area has EMPNAME, EMPNO, and ADDRESS. Physical segment after update has a blank BIRTHD field and NEW YORK in the ADDRESS field.

The 'LL' field is maintained by IMS to include the full length of the ADDRESS field and all fields up to the ADDRESS field. BIRTHD is filled with blanks, because TYPE=C is specified on the FIELD statement in the DBD. Positions 34 to 42 are set to binary zeros, because the space was not defined by a FIELD statement in the DBD.