Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


Varying the input or output file at run time

The file-name that you code in a SELECT clause is used as a constant throughout your COBOL program, but you can associate the name of the file with a different actual file at run time.

Changing a file-name in a COBOL program would require changing the input statements and output statements and recompiling the program. Alternatively, you can change the assignment-name in the SET command to use a different file at run time.

Environment variable values that are in effect at the time of the OPEN statement are used for associating COBOL file-names to the system file-names (including any drive and path specifications).

Example: using different input files


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)