XL Fortran for AIX 8.1

User's Guide


Selecting Error Messages and Recovery Actions

By default, an XLF-compiled program continues after encountering many kinds of errors, even if the statements have no ERR= or IOSTAT= specifiers. The program performs some action that might allow it to recover successfully from the bad data or other problem.

To control the behavior of a program that encounters errors, set the XLFRTEOPTS environment variable, which is described in Setting Run-Time Options, before running the program:

For example:

# Switch defaults for some run-time settings.
XLFRTEOPTS="err_recovery=no:cnverr=no"
export XLFRTEOPTS

If you want a program always to work the same way, regardless of environment-variable settings, or want to change the behavior in different parts of the program, you can call the SETRTEOPTS procedure:

PROGRAM RTEOPTS
USE XLFUTILITY
CALL SETRTEOPTS("err_recovery=no") ! Change setting.
... some I/O statements ...
CALL SETRTEOPTS("err_recovery=yes") ! Change it back.
... some more I/O statements ...
END

Because a user can change these settings through the XLFRTEOPTS environment variable, be sure to use SETRTEOPTS to set all the run-time options that might affect the desired operation of the program.


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