DCB attributes and options are relevant to INFILE and
FILE statements as well as to the FILENAME statement. This section
provides some background information about DCB characteristics.
DCB attributes are those
data set characteristics that describe the organization and format
of the data set records. If you do not specify these attributes,
SAS uses default values. This section discusses how and under what
circumstances these attributes are changed or default values are used.
The discussion focuses
on the RECFM, LRECL, and BLKSIZE file attributes. For more information,
see the appropriate data administration guide for your system.
Values for these attributes
are kept in each of the following operating environment control blocks:
Data Set Control Block (DSCB)
is the description found in the VTOC of the disk device on which
the physical file resides. They are the permanent characteristics
of the data set. For tape devices, the data set label in the header
of SL tapes contains this information.
Job File Control Block (JFCB)
maps a physical file on a device to a logical name (ddname). Contains
information from a JCL DD statement, TSO ALLOCATE command, SAS FILENAME
statement, or SAS FILENAME function. These attributes are either
temporary (for the duration of the allocation) or new (to be made
permanent).
describes the current state of an open data set. z/OS and its access
methods (BSAM for SAS software) use the DCB to control how data is
read or written. These attributes are temporary for input, but they
become permanent for output.
For existing data sets,
DCB attributes are almost never changed from the DSCB. These attributes
can be overridden by a DD statement or TSO ALLOCATE command or by
SAS FILENAME, FILE, or INFILE statement options. If a DCB option
is specified in both places, the FILENAME, FILE, or INFILE option
takes precedence.
When you open a data
set,
z/OS merges information from the DSCB (or data set label) and
the JFCB to obtain the current DCB characteristics before entering
the DCB open exit. SAS then merges its own information (FILENAME/FILE/INFILE
statement options, data set device type, requested data set type,
requested line size from LS=) and inspects the resulting DCB attributes.
If the result is invalid for some reason, SAS terminates the open
operation and issues an appropriate message. Attributes can be considered
invalid for any of the following reasons:
-
For RECFM=V or VB, BLKSIZE is not
at least 4 bytes greater than LRECL.
-
For RECFM=F, LRECL equals neither
0 nor BLKSIZE.
-
For RECFM=FB, BLKSIZE is not a
multiple of LRECL.
-
BLKSIZE or LRECL is greater than
the
z/OS maximum (32,760).
-
LRECL is greater than BLKSIZE (except
RECFM=VBS).
-
RECFM is not consistent with the
requested data set type.
-
The requested data length cannot
be contained in LRECL.
For any unspecified
attributes, SAS uses default values that seem to fit existing attributes.
For input files, the attributes are usually complete and consistent.
For output files, it is best to specify the values for RECFM and LRECL.
SAS will fill in the value for BLKSIZE automatically based on the
settings for the FILEBLKSIZE(device)= option.
If no permanent attributes
are present (as is possible with a new data set), and if none are
given by FILENAME/FILE/INFILE options, then SAS uses default values
that are based on the device type and data set type.
The following table
summarizes these default values:
Default Attribute Values
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1The smaller of the SAS
system option FILEBLKSIZE(device-type)=
value and the output device maximum, rounded down to a multiple of
the LRECL.
|
2The smaller of the SAS
system option FILEBLKSIZE(device-type)=
value and 32,760, rounded down to a multiple of the LRECL.
|
If you specify a line
size (LS=) parameter, SAS uses it to compute the LRECL and the BLKSIZE.
If you override permanent
attributes on input, SAS uses the new values only for the duration
of the INFILE processing; the permanent attributes of the data set
are not changed. However, if you override the attributes on output,
the new attributes become permanent for the data set, even if no records
are physically written.