9.3.48 ERRSNS ([IO_ERR] [, SYS_ERR] [, STAT] [, UNIT] [, COND])

Description:  Returns information about the most recently detected I/O system error condition.  
Class:  Subroutine 
Arguments:  There are five optional arguments: 
  IO_ERR (opt) Is an integer variable or array element that stores the most recent Compaq Fortran RTL error number that occurred during program execution. (For a listing of error numbers, see your user manual or programmer's guide.)

A zero indicates no error has occurred since the last call to ERRSNS or since the start of program execution.
 
  SYS_ERR (opt) Is an integer variable or array element that stores the most recent system error number associated with IO_ERR. This code is one of the following:

  • On OpenVMS systems, it is an RMS STS value.

  • On Tru64 UNIX and Linux systems, it is an errno value. (See errno(2).)

  • On Windows systems, it is the value returned by GetLastError( ) at the time of the error.
  STAT (opt) Is an integer variable or array element that stores a status value that occurred during program execution. This value is one of the following:

  • On OpenVMS systems, it is an RMS STV value.

  • On Tru64 UNIX, Linux, and Windows systems, the value is zero.
  UNIT (opt) Is an integer variable or array element that stores the logical unit number, if the last error was an I/O error. 
  COND (opt) Is an integer variable or array element that stores the actual processor value. This value is always zero.

If you specify INTEGER(2) arguments, only the low-order 16 bits of information are returned or adjacent data can be overwritten. Because of this, it is best to use INTEGER(4) arguments.

The saved error information is set to zero after each call to ERRSNS.
 

Examples

Any of the arguments can be omitted. For example, the following is valid:

CALL ERRSNS (SYS_ERR, STAT, , UNIT)


Previous Page Next Page Table of Contents