Users of SAS 9.2 with IBM
z/OS V1R7.0 or later can use
random access (byte-addressable) techniques to read and create BSAM
files. For example, fonts files, which previously conformed to certain
restrictive rules (
LRECL=1
,
RECFM=F
,
FS,
or FBS
) can now be read regardless of their format,
including existing as members of a PDS or PDSE. Also, graph procedures
can now be used to write image files as BSAM data sets.
Random access (byte
addressability) to BSAM files is achieved by copying or creating files
in 64-bit storage. The size of this storage is determined by the value
of MEMLIMIT, which is determined by the systems programmer at your
site. The value set for MEMLIMIT can be overridden in the JCL or by
SMF parameters, commands, or exits.
For input files, SAS
BSAM allocates 64-bit storage by determining the size of the existing
file. For output files, SAS BSAM allocates 64-bit storage by using
information for the space allocation request. If no space allocation
request is made, then default values from SAS system options FILESPPRI,
FILESPSEC and FILEUNIT are used. It is possible that SAS might not
be able to use 64-bit storage for a file because of one of the following
reasons:
-
MEMLIMIT is not set, or it is too
small for the file.
-
Insufficient 64-bit storage is
available due to other uses of this storage.
In cases like these, SAS attempts to open and process
the file on disk, if it is an input file and conforms to the file
characteristics described. Otherwise the attempt to open the file
for random processing fails. In addition to existing ERROR messages,
the following explanatory note is issued:
Note: Random access to sequential file dataset-name: storage array
could not be allocated, and mode or file characteristics do not permit
opening file as binary.
To avoid possible confusion
caused by trailing blank spaces or nulls in the last record, BSAM
random access files that are created with a RECFM, other than V, VS,
VB, or VBS, have their RECFM changed to VB. A message is then issued
to the SAS log.
Output data is written
from above-the-bar storage to disk when the file is closed. If there
is more data in the storage array than has been allowed for in the
disk space allocation for the file, then an undetermined I/O error
occurs. The following message is then issued:
Note: Random access file <name>: output file might be incomplete.
Normal file definitions
do not apply to a BSAM file resident in an above-the-bar storage array.
Certain characteristics are assigned while the file resides in that
location (
LRECL=1
,
RECFM=fbs
,
BLKSIZE=total
filesize
) to enable seamless processing.
If you display the file's definition during this period, it returns
those characteristics.