Overrides: An overview

An override is a CL command that temporarily changes a file name, a device name, or remote location name associated with the file, or some of the other attributes of a file.

You can enter override commands interactively from a display station or submit them as part of a batch job. You can include them in a control language (CL) program, or issue them from other programs by calling the program QCMDEXC. Regardless of how they are issued, overrides remain in effect only for the job, program, or display station session in which they are issued. Furthermore, they have no effect on other jobs that might be running at the same time.

When you create an application program, the file names specified in the program associate files with it. The server lets you override these file names or the attributes of the specified file when you compile a program or run a program.

You can use overrides to change most, but not all, of the file attributes that are specified when the file is created. In some cases, you can specify attributes in overrides that are not part of the original file definition.

Overriding a file is different from changing a file in that an override does not permanently change the attributes of a file. For example, if you override the number of copies for a printer file by requesting six copies instead of two, the file description for the printer file still specifies two copies, but six copies are printed. The server uses the file override command to determine which file to open and what its file attributes are.

The server supplies three override functions:

Handling overrides for message files is different in some respects from handling overrides for other files. You can override only the name of the message file, and not the attributes.

Related information
Control language (CL)