The fopen() and freopen() keyword noseek requests
QSAM (queued sequential access method) be used to process the data
set. This request also indicates that the repositioning functions
will not be used by the application. This access method generally
provides the best performance. Omitting the keyword noseek
selects BSAM (basic sequential access method) with NOTE and POINT macros
requested, allowing repositioning functions to be used (where applicable)
on the stream.
The following scenarios exist where QSAM (
noseek) is
requested, but the z/OS XL C/C++ runtime Library switches to BSAM
with
NOTE and
POINT macros requested (
seek):
- The data set is opened for update (r+, rb+, w+, wb+, a+,
ab+)
- The data set is already opened for write (or update) in the same
C process
- The data set is RECFM=FBS opened for append (a,
ab, a+, ab+)
- The data set is LRECL=X
- The data set is the directory of a partitioned data set (PDS or
PDSE)
- The data set is a member of a partitioned data set where the member
was not specified at allocation, but rather specified at fopen() or freopen()
Note: Repositioning is not allowed when noseek is
requested, even if there was a switch to seek.