z/OS DFSMS Using Data Sets
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Record Processing for UNIX Files

z/OS DFSMS Using Data Sets
SC23-6855-00

Record boundaries are not maintained within binary files, but the access method maintains record boundaries when FILEDATA=TEXT or FILEDATA=RECORD is in effect. Text files are presumed to be EBCDIC. Repositioning functions (such as POINT, CLOSE TYPE=T, GET DIRECT) are not permitted for FIFO or character special files.

When a file is accessed as binary, the length of each record is returned in the RPL as the largest possible record, except, possibly, the last record. The length of the last record is whatever remains after the previous GET macro.

When a file is accessed as text, if any record in the file consists of zero bytes (that is, a text delimiter is followed by another text delimiter), the record returned consists of one blank. If any record is longer than the length of the buffer, it results in an error return code for GET (for an ACB).

When a file is accessed as record-oriented (with FILEDATA=RECORD), your program does not see the record prefixes. The PUT macro adds a prefix to each record in the same format as with BSAM or QSAM. A GET macro removes the prefix. Each record prefix is mapped by the IGGRPFX macro. It is the following four bytes:
Offset  Length     Symbol       Description

  0       1          RPFX00     Reserved.
  1       3          RPFXLLL    Length of record that follows this prefix.  
If any record in the file consists of zero bytes (that is, the length field in the record prefix contains zero) or if any record is longer than the length of the buffer, it results in an error return code for GET.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014