Jump to content

NETDATA

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Peter Flass (talk | contribs) at 22:26, 5 September 2019 (Control records: add more). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

NETDATA is a file format used primarily for data transfer and storage on IBM mainframe systems, although implementations are available for other systems.

Description

NETDATA files are run-length encoded card image files containing file data plus metadata which allows the file to be reconstituted on the receiving system. A complete NETDATA file consists of a number of control records, followed by data records and terminated by a trailer record. All records have the same format:

  • A one-byte length field containing the length of a logical segment of the file. A segment has a maximum length of 255 bytes. With the length and flags a segment can contain up to 253 bytes of data.[1]
  • A one-byte flags field describing this segment:
    • X'80' - this is the first segment of a record
    • X'40' - this is the last segment of a record. If the record requires only one segment the flags will contain X'C0'
    • X'20' - this segment is part of a control record
    • X'10' - this segment contains the record number of the next record
    • X'0F' - reserved

Control records

Control records have a six-character EBCDIC identifier in bytes 2-7 following the length and flags. They contain a number of self-defining fields, called text units. Each text unit consists of a two byte text unit key identifying this text unit, a two-byte big-endian binary number of length-data pairs that follow for this key (usually one), a two byte length field identifying the length of the text unit data, and a text unit of the specified length. Implementations are expected to ignore any text unit information not relevant to the receiving system.

Header Control Record
The header record must be the first record of a NETDATA file. It has the identifier "INMR01". It contains information identifying the sender: node (host), timestamp, and user id, the length of the control record segments, and the target (receiving) node and user id. It may optionally contain a request for acknowledgement of receipt, the version number of the data format, the number of files in the transmission, and a "user parameter string." CMS allows only one file per transmission, but TSO/E and other systems may allow more than one.

File Utility Control Record
This record describes how the file's data is to be reconstituted. Its identifier is "INMR02". Bytes 8-11 contain the big-endian binary number of the file to which this record applies. If there are multiple files in a transmission they are numbered starting with one. The rest of this record describes the file's format, and one or more steps ("utility programs") which must be executed in order to rebuild this file. The text units identify the file's organization (INMDSORG: sequential, partitioned, etc.), its fixed of maximum record length (INMLRECL), its record format (INMRECFM: fixed, variable, etc) the approximate size of the file (IBMSIZE), and the utility program name(s) (INMUTILN). It may also contain the file's block size, creation date, number of directory blocks, name, expiration date, file mode number, last change date, last reference date, member name list (for partitioned datasets), a note file, and a user parameter string.

Data Control Record
The Data Control Record immediately precedes the data and describes its format, similar to the Utility Control Record. Its identifier is "INMR03". This record is ignored by CMS, but is used by TSO/E. It contains the file's organization (INMDSORG), its record length (INMLRECL), its record format (INMRECFM), and the file size (IBMSIZE).

User Control Record
The User Control record can appear at any point in the data stream. Its identifier is "INMR04". If present it is ignored by CMS, but may be used by other systems. It contains only a User Parameter String (INMUSERP).

Trailer Control Record
This record marks the end of the file. Its identifier is "INMR06".

Acknowledgement Control Record

Data records

Data records (identified by their flag value), follow the Data Control Record, if present, and precede the Trailer Control Record.

References

  1. ^ IBM Corporation. "x/VM: CMS Macros and Functions Reference". IBM Knowledge Center. Retrieved Sep 5, 2019.