NETDATA
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."
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 gformat, 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
User Control Record
Trailer Control Record
Acknowledgement Control Record
References
- ^ IBM Corporation. "x/VM: CMS Macros and Functions Reference". IBM Knowledge Center. Retrieved Sep 5, 2019.