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


Protecting against errors when opening files

If a program tries to open and read a file that does not exist, normally an error occurs.

However, there might be times when opening a nonexistent file makes sense. For such cases, use the optional keyword OPTIONAL with SELECT:

SELECT OPTIONAL file ASSIGN TO filename

Terms of use | Feedback

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