Previous Topic Next topic Print topic


C$RERR

Returns the expanded I/O completion status, based on an error code received at run-time.

This routine returns either a four-character or an eleven-character extended status code, depending upon the length of the data item specified in the USING phrase. This status is for the last attempted I/O operation. The value returned conforms to ANSI COBOL 1985.

Syntax:

CALL "C$RERR" USING extended-status

Parameters:

extended-status
PIC X(4) or PIC X(11)

On Exit:

extended-status
The data item into which the expanded I/O completion status is stored in ASCII characters.

Comments:

If extended-status is four characters in length, the first two character positions contain the same digits as would the file status data item on completion of the I/O operation. The last two character positions provide additional information about the file status. In cases where only two digits for a status are shown, the last two character positions will contain ASCII zeroes. Although most statuses contain only the decimal digits 0 to 9, note that the hexadecimal digits A to F are possible in some character positions. Refer to Appendix A: Runtime Messages of the RM/COBOL User's Guide for a full list of status codes.

If extended-status is eleven characters in length, the first two character positions (positions one and two) contain the same digits as would the file status data item on completion of the I/O operation. In cases where Appendix A shows only two digits for a status, the remaining nine character positions contain ASCII blanks. In cases where Appendix A shows four digits for a status, character position three contains an ASCII comma, character positions four and five contain the last two digits of the status, and the remaining six character positions contain ASCII blanks. For permanent errors, that is, when the first two digits are 30, character position three contains an ASCII comma, character positions four and five contain a two-digit OS code (see the table below), character position six contains an ASCII comma, and character positions seven through eleven contain a five-digit, OS-specific error code. Refer to the Input/Output Errors section of the RM/COBOL User's Guide.

Table 1. The two-digit OS codes
Code Description
00 Unknown OS error
01 File Manager Detected error
04 UNIX error
06 Btrieve error
10 Open File Manager error
11 C Library error
12 MS-Windows error
15 RM/InfoExpress Server error
16 RM/InfoExpress Client error
21 RM/InfoExpress WinSock error
Previous Topic Next topic Print topic