Any or all of the attributes of a file used by a task can be assigned values in a file equation.
When the program opens a file that has been file-equated, the attribute values specified for that file in the WFL job are merged with those specified in the file declaration in the program. If a file attribute is assigned a different value in the file equation than it is in the file declaration in the program, then the value assigned in the file equation takes precedence. If a file that is file-equated is not opened by the program, then the file equation has no effect.
Certain combinations of file attribute assignments might not be legal; for example, the value of the BLOCKSIZE attribute must be evenly divisible by the value of the MAXRECSIZE attribute. Thus, a file equation that sets MAXRECSIZE to a value incompatible with the BLOCKSIZE attribute would generate a run-time error.
In cases where a program uses a file that already exists (rather than creating one), any file equations included for that file in the WFL jobs do not affect the physical file that the program uses. Instead, such file equations alter the way the program reads from or writes to the file.
For more information about file attributes, refer to the File Attributes Programming Reference Manual.
Example
The following is an example of a file equation that assigns several attributes:
FILE INFILE (TITLE=(WALLY)OD/CON ON PARTS,KIND=DISK, MAXRECSIZE=12,SECURITYTYPE=PUBLIC);