Abbreviation: ENV
The ENVIRONMENT attribute and its options specify many record characteristics that are not part of the PL/I language. Its format is:
ENVIRONMENT(options–list)
options-list can contain any of a number options specifying record characteristics. For example,
ENVIRONMENT(VSAM KEYLOC(1) KEYLENGTH(12));
The ENVIRONMENT attribute is not supported for use with a STREAM file.
When a new file is created or an existing file is opened, the attributes of the file declaration and contextual usage within the code (including the ENVIRONMENT attribute) are merged with those of the JCL DD and/or environment variables associated with the DD. In the absence of any overriding attribute supplied by one of those mechanisms, the following behaviors are used:
DCL FILE1 FILE ENV(F); /* Fixed length records */ DCL FILE2 FILE ENV(V); /* Variable length records - Micro Focus Variable format */ DCL FILE3 FILE; /* File will be LSEQ by default */