Handling of Empty Records

The handling of empty records is complicated on z/OS. FLAM5 uses the language environment (LE) to read and write records. If the environment variable '_EDC_ZERO_RECLEN' is not defined, it defaults to Y(es) for the record I/O operations. When reading, this results in an empty record being converted to a neutral FLAM5 record element.

When writing, however, an empty variable length record is not written at all by the LE. To circumvent this, a padding character (default: 0x00) is written for an empty variable length record. To suppress this added padding character when reading the output file later, a record of length 1 with 0x00 or 0x40 will result in an empty record of length 0 if the environment variable '_EDC_ZERO_RECLEN' is set to 'Y'.

In any other case, empty variable length records are converted to a record of length 1 containing the padding character by default on z/OS (binary files: 0x00, text files: whitespace character (0x40)). On platforms which support writing empty variable length records, when writing fixed-length records or when print control characters are used, this kind of dirty padding of empty variable length records is not done.