OS.ERROR()

OS.ERROR()

Top  Previous  Next

 

The OS.ERROR() function returns the error number associated with the last recorded operating system level error.

 

 

Format

 

OS.ERROR()

 

 

Some actions that return errors via the STATUS() function are related to errors from operating system calls. The OS.ERROR() function returns the value of the most recent operating system error. The QM error codes for which this is valid are all marked with "os.error" in the SYSCOM ERR.H include record. The value returned by OS.ERROR() at other times is meaningless.

 

The values returned by OS.ERROR() are defined by the operating system and program development libraries. They are outside the control of QM and are documented with the operating system. In general users of Unix/Linux based systems can find these in the errno.h include record in /usr/include though this file then includes a variety of further include records. Windows users can find error numbers on the MSDN area of Microsoft's web site but they are scattered over several pages.

 

The !ERRTEXT() subroutine will automatically insert this value into relevant expanded error messages.