Return organization of a z/OS UNIX file - Key = 'C01D'

DINRFDAT requests the return of the organization of an z/OS® UNIX file.

When you code DINRFDAT, # must be 1, LEN must be at least 1 and can be longer, and the PARM field must be the length specified by the LEN value. If there is an organization associated with the allocation, the system returns the organization in PARM and 0001 in LEN. PARM will contain one of the following values:
  • X'80' - the z/OS UNIX file organization is binary — records not delimited.
  • X'40' - the z/OS UNIX file is text — records delimited by EBCDIC newline characters (x'15').
  • X'20' - the z/OS UNIX file is organized into records that have prefixes. Each record prefix contains the length of the record that follows. On output, the access method inserts a record prefix at the beginning of each record. On input, the access method uses the record prefix to determine the length of each record. The access method does not return the prefix as part of the record. Code FILEDATA=RECORD when you cannot code FILEDATA=TEXT because your data might contain bytes that are considered delimiters.

Example: To request the return of the organization of the z/OS UNIX file /u/myuid/scr.dat, code:

Input:
KEY    #     LEN   PARM
8017   0001  0010  61 A4 61 94 A8 A4 89 84 61 A2 83 99 4B 84 81 A3
C01D   0001  0001  00
Output:
KEY    #     LEN   PARM
C01D   0001  0001  80

The retrieved information indicates a file organization of binary.