C programs process cataloged disk files by means of the SAM, ISAM and PAM access methods.
When an existing file is opened, the access method and other file attributes are taken from the catalog entry.
When a new file is created, default values of the C runtime library are assigned in accordance with the type of C file (binary file, text file, stream-oriented or record-oriented I/O). These values can be changed with an ADD-FILE-LINK
command before the program is called. To do this, a link name ("link=
linkname"
) must be specified with the open functions (open()
, creat()
, fopen()
, freopen()
), and this link name must be associated with the name of the cataloged file in the ADD-FILE-LINK
command.
Not all possible file attributes can be combined. Combinations that are not required for performance reasons are not supported by the I/O functions of the C runtime library.
The following sections provide information on
the default values and possible modifications of the file attributes
the K and NK block formats
stream-oriented and record-oriented processing of disk files,
Last Byte Pointer (LBP).