Table 13 summarizes the ENVIRONMENT options. The options applicable to stream-oriented data transmission are:
CONSECUTIVE or ORGANIZATION(CONSECUTIVE) F|FB|FS|FBS|V|VB|VS|VBS|U RECSIZE(record-length) BLKSIZE(block-size) GRAPHIC LEAVE|REREAD
BLKSIZE is described in Using data sets and files, beginning on page BLKSIZE option. LEAVE and REREAD are described later in this chapter, beginning at LEAVE|REREAD. Descriptions of the rest of these options follow immediately below.
STREAM files must have CONSECUTIVE data set organization; however, it is not necessary to specify this in the ENVIRONMENT options since CONSECUTIVE is the default data set organization. The CONSECUTIVE option for STREAM files is the same as that described in Data set organization.
>>-CONSECUTIVE-------------------------------------------------><
Although record boundaries are ignored in stream-oriented data transmission, record format is important when creating a data set. This is not only because record format affects the amount of storage space occupied by the data set and the efficiency of the program that processes the data, but also because the data set can later be processed by record-oriented data transmission.
Having specified the record format, you need not concern yourself with records and blocks as long as you use stream-oriented data transmission. You can consider your data set a series of characters or graphics arranged in lines, and you can use the SKIP option or format item (and, for a PRINT file, the PAGE and LINE options and format items) to select a new line.
>>-+-F---+----------------------------------------------------->< +-FS--+ +-FB--+ +-FBS-+ +-V---+ +-VS--+ +-VB--+ +-VBS-+ '-U---'
Records can have one of the following formats, which are described in Record formats.
|
Fixed-length |
F FB FS FBS |
unblocked blocked unblocked, standard blocked, standard |
|
Variable-length |
V VB VS VBS |
unblocked blocked |
|
Undefined-length |
U |
(cannot be blocked) |
Blocking and deblocking of records are performed automatically.
RECSIZE for stream-oriented data transmission is the same as that described in Specifying characteristics in the ENVIRONMENT attribute. Additionally, a value specified by the LINESIZE option of the OPEN statement overrides a value specified in the RECSIZE option. LINESIZE is discussed in the PL/I Language Reference.
Additional record-size considerations for list- and data-directed transmission of graphics are given in the PL/I Language Reference.
If you do not specify the record format, BLKSIZE, or RECSIZE option in the ENVIRONMENT attribute, or in the associated DD statement or data set label, the following action is taken:
Output files:
Specify the GRAPHIC option for edit-directed I/O.
>>-GRAPHIC-----------------------------------------------------><
The ERROR condition is raised for list- and data-directed I/O if you have graphics in input or output data and do not specify the GRAPHIC option.
For edit-directed I/O, the GRAPHIC option specifies that left and right delimiters are added to DBCS variables and constants on output, and that input graphics will have left and right delimiters. If you do not specify the GRAPHIC option, left and right delimiters are not added to output data, and input graphics do not require left and right delimiters. When you do specify the GRAPHIC option, the ERROR condition is raised if left and right delimiters are missing from the input data.
For information on the graphic data type, and on the G-format item for edit-directed I/O, see the PL/I Language Reference.