Optional deletion of null characters for DPM-An
MFS provides for optional deletion of trailing null characters in transmission records and input data fields from SLU P (DPM-An) remote programs. (A null character is a hexadecimal zero, X'00'.) In the DIV statement, the device input format can specify NULL=KEEP or NULL=DELETE. NULL=DELETE means that MFS scans data fields and transmission records for trailing nulls and deletes them. KEEP is the default and means that MFS leaves trailing nulls in the data and treats them as valid data characters.
If trailing null characters have been replaced by fill characters by the remote program, MFS treats the fill characters as valid data characters.
When NULL=DELETE is specified, nulls at the end of a record are deleted before the data fields are scanned. In record mode, the end of the record is determined either by the FTAB or by the first other non-null character found (searching backward from the end of the record). In stream mode, trailing nulls at the end of the record are deleted only if an FTAB indicates the end of the record; otherwise, the record is handled as received from the remote program.
During the data field scan, the first trailing null character encountered in the field signifies the end of the data for the current field. The data is edited into the message field using the message fill character to pad the field if required. If the entire field contains nulls (such as nulls at the end of the record), the entire message field is padded with the specified fill character.
The scan for trailing null characters within fields is performed for each record transmitted. If an FTAB character is encountered in the current record being processed, the scan for trailing nulls characters within fields is discontinued for that record and resumes with the next record.
Transmitting null characters to either IMS TM or the delete operation is costly in execution time. Weigh the relative costs when you decide whether to use the NULL=DELETE option or to delete the nulls using the remote program. You must also consider the effects of the FTAB options FORCE, MIX, and ALL. These costs are affected by the following:
- When FTAB=ALL is specified with NULL=DELETE, only trailing null characters at the end of the record can be removed by MFS.
- In stream mode, with NULL=DELETE, an FTAB should be used to show an omitted field at the end of a record. Otherwise, nulls (equal to the number of characters defined for the field or fields) must be transmitted.
- If FTABs are specified and NULL=DELETE, nulls and FTABs can be mixed. FTABs can be used for one record, nulls for the next. The nulls are removed from the record with no FTABs. With FTABs in the record, null characters are treated as data.
- With NULL=DELETE, binary data that might contain valid trailing hexadecimal zeros (not intended as null characters) must be preceded by an FTAB character for a previous field to prevent deletion of the trailing X'00'.