The ERR keyword identifies the executable statement that receives control when an error occurs. It takes the following form:
ERR = s
The ERR keyword applies only to the OPEN statement in which it is specified, not to subsequent I/O operations on the unit. If an error occurs, no file is opened or created. However, you can use the IOSTAT keyword in subsequent I/O statements to perform a similar function.
For details on using the IOSTAT parameter in a control list, see Section 7.1.1.9.