ILE COBOL Programmer's Guide


Redirecting File Input and Output

Another form of file overriding is to redirect the ILE COBOL program to access a different file. When the override redirects the program to a file of the same type (such as a printer file to another printer file), the file is processed in the same manner as the original file.

When the override redirects the program to a file of a different type, the overriding file is processed in the same manner as the original file would have been processed. Device-dependent specifications in the ILE COBOL program that do not apply to the overriding device are ignored by the system.

Not all file redirections are valid. For example, an indexed file for an ILE COBOL program can only be overridden to another indexed file with a keyed access path.

Multiple member processing can be accomplished for a database file by overriding a database file to process all members. Note the following exceptions:

You must ensure that file overrides are applied properly. For more information on valid file redirections, the device dependent characteristics ignored, and the defaults assumed, refer to the Programming category in the iSeries 400 Information Center at this Web site -http://publib.boulder.ibm.com/pubs/html/as400/infocenter.htm.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]