NETDATA Conversion Routine

DMTDDL enables RSCS tasks (for example, DMTNOT) to create NETDATA formatted notes. The NETDATA format is also created by the CMS SENDFILE and TSO XMIT commands.

The NETDATA format segments the records of the original file to create a data stream that consists of an 80 byte record. DMTDDL transforms an incoming stream of records into a stream of output records that is compatible with the NETDATA format. Files created by DMTDDL are always written to a virtual punch device, which the calling task must identify in an IOTABLE.

The NETDATA format consists of headers at the top of the file, records that make up the body of the file, and a trailer. The header and trailer records are identified by the label INMR0x. DMTDDL creates the following NETDATA records for RSCS:
INMR01
Header record, containing the following information about the file:
  • Logical record length
  • Origin node and user ID
  • Destination node and user ID
  • Origin creation time
  • Number of files contained in this file (used for partitioned datasets that cannot be created by DMTDDL).
INMR02
Header record, containing information about the file’s size and record characteristics.
INMR03
Header record, containing information about the file’s size and record characteristics.
INMR06
Trailing record.
When a routine calls DMTDDLEP, it must provide the following information:
  • The IOTABLE for the device to which the NETDATA records are written
  • The TAG element for the file to be processed
  • A pointer to, and the length of, an input record (maximum length is 255 bytes)
  • A pointer to a DDL work area.

On the first call to DMTDDLEP, the pointer to the DDL work area is zero; this identifies the first record in the new file being processed. DMTDDLEP acquires a DDL work area and creates the INMR01, INMR02, and INMR03 header records. When a complete 80 byte record has been filled, DMTDDL calls DMTUROEP to write the record to the device specified in the IOTABLE. This process continues for all following input records.

DMTDDL writes records to punch devices. Because the calling routine may provide records of varying lengths, DMTDDL segments the records into appropriate lengths for the punch device. Portions of the previous record are often kept in the DDL work area until the calling routine provides the next record.

When the end of the file is reached, the calling routine passes a zero input record pointer to DMTDDL. DMTDDL then generates the INMR06 trailing record and pads the rest of the record with zeros. DMTDDL calls DMTUROEP to write the last record to the specified device. It then releases the DDL work area before returning control to the calling routine. The calling routine must call DMTUROFL to flush any remaining CCWs in the file I/O area.

See z/VM: CMS Macros and Functions Reference for more information on NETDATA formats.