Retrieving partially present fields

If the last field in the physical variable-length segment at retrieval time is only partially present and if the data type is character (TYPE=C), data is returned to the application program padded with blanks on the right. Otherwise, the field is returned with a fill value based on the data type.

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

Figure 1. Example of a partially present field on a retrieval call
Physical segment on disk has the fields LL, EMPNO, EMPNAME, BIRTHD (blank) and ADDRESS. I/O area has EMPNAME, EMPNO, and ADDRESS. ADDRESS field is padded with blanks.

The ADDRESS field in the I/O area is padded with blanks to correspond to the length defined on the SEGM statement in the DBD.