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 system are assigned according to the type of C file (binary file, text file, stream-oriented or record-oriented input/output). 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 for the open functions (open
/open64
, creat
/creat64
, fopen
/fopen64
, freopen
/freopen64
) and this link name must be linked with the name of the cataloged file in the ADD-FILE-LINK command.
Not all possible file attributes can be combined. Combinations which are not necessary either for functional or performance reasons are not supported by the input/output functions of the C runtime system.
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
the Last Byte Pointer (LBP).