You use the ENVIRONMENT attribute of a PL/I file declaration file to specify information about the physical organization of the data set associated with a file, and describe other related information. The format of this information must be a parenthesized option list.
>>-ENVIRONMENT--(--option-list--)------------------------------><
Abbreviation: ENV
You can specify the options in any order, separated by blanks or commas.
The following example illustrates the syntax of the ENVIRONMENT attribute in the context of a complete file declaration (the options specified are for VSAM).
DCL FILENAME FILE RECORD SEQUENTIAL
INPUT ENV(VSAM GENKEY);
Table 1 summarizes the ENVIRONMENT options and file attributes. Certain qualifications on their use are presented in the notes and comments in the table.
Data set type |
S |
Record |
Legend:
|
||||||||
File |
C |
Sequential |
Direct |
||||||||
Consecutive |
|||||||||||
B |
U |
R |
T |
I |
V |
R |
I |
V |
|||
File attributes1 |
Attributes implied |
File |
I |
I |
I |
I |
I |
I |
I |
I |
I |
I |
|
Input1 |
D |
D |
D |
D |
D |
D |
D |
D |
D |
D |
File |
Output |
O |
O |
O |
O |
O |
O |
O |
O |
O |
O |
File |
Environment |
I |
I |
I |
S |
S |
S |
S |
S |
S |
S |
File |
Stream |
D |
- |
- |
- |
- |
- |
- |
- |
- |
- |
File |
Print1 |
O |
- |
- |
- |
- |
- |
- |
- |
- |
- |
File stream output |
Record |
- |
I |
I |
I |
I |
I |
I |
I |
I |
I |
File |
Update |
- |
O |
O |
O |
- |
O |
O |
O |
O |
O |
File record |
Sequential |
- |
D |
D |
D |
- |
D |
D |
- |
- |
D |
File record |
Buffered |
- |
D |
- |
- |
I |
D |
D |
- |
- |
S |
File record |
Keyed2 |
- |
- |
- |
O |
I |
O |
O |
I |
I |
O |
File record |
Direct |
- |
- |
- |
- |
- |
- |
S |
S |
S |
S |
File record keyed |
|
ENVIRONMENT options |
Comments |
F|FB|FS|FBS|V| |
I |
S |
S |
- |
- |
- |
N |
- |
- |
N |
VS and VBS are invalid |
F|FB|U |
S |
S |
- |
- |
- |
- |
N |
- |
- |
N |
ASCII data sets only |
F|V|U |
- |
- |
- |
S |
- |
- |
N |
S |
- |
N |
Only F for REGIONAL(1) |
F|FB|V|VB |
- |
- |
- |
- |
- |
S |
N |
- |
S |
N |
|
RECSIZE(n) |
I |
I |
I |
I |
S |
I |
C |
I |
I |
C |
RECSIZE and/or BLKSIZE |
BLKSIZE(n) |
I |
I |
I |
I |
- |
I |
N |
I |
I |
N |
indexed, and regional files |
SCALARVARYING |
- |
O |
O |
O |
- |
O |
O |
O |
O |
O |
Invalid for ASCII data sets |
CONSECUTIVE |
D |
D |
D |
- |
- |
- |
O |
- |
- |
O |
Allowed for VSAM ESDS |
LEAVE|REREAD |
O |
O |
O |
- |
- |
- |
- |
- |
- |
- |
|
CTLASA|CTL360 |
- |
O |
O |
- |
- |
- |
- |
- |
- |
- |
Invalid for ASCII data sets |
GRAPHIC |
O |
- |
- |
- |
- |
- |
- |
- |
- |
- |
|
INDEXED |
- |
- |
- |
- |
- |
S |
O |
- |
S |
O |
Allowed for VSAM ESDS |
KEYLOC(n) |
- |
- |
- |
- |
- |
O |
- |
- |
O |
- |
|
ORGANIZATION |
D |
- |
- |
- |
- |
- |
- |
- |
- |
- |
|
GENKEY |
- |
- |
- |
- |
- |
O |
O |
- |
O |
O |
INPUT or UPDATE files only; |
REGIONAL(1) |
- |
- |
- |
S |
- |
- |
- |
S |
- |
- |
|
VSAM |
- |
- |
- |
- |
- |
- |
S |
- |
- |
S |
|
BKWD |
- |
- |
- |
- |
- |
- |
O |
- |
- |
O |
|
REUSE |
- |
- |
- |
- |
- |
- |
O |
- |
- |
O |
OUTPUT file only |
Notes:
|
Those ENVIRONMENT options that apply to more than one data set organization are described in the topics that follow. In addition, in the following sections, each option is described with each data set organization to which it applies.