Previous Topic Next topic Print topic


C$RERR

Returns extended file status information for the last I/O statement.

Syntax:

CALL "C$RERR" USING extend-stat [text-message, status-type]

Parameters:

extend-stat
PIC X(5) or larger
text-message
PIC X(n)
Note: This optional parameter is ignored in this COBOL system.
status-type
PIC 9
Note: This optional parameter is ignored in this COBOL system.

On Exit:

extend-stat
Returns the extended file status caused by the last file I/O

Comments:

The statuses returned are listed in the file status table found in Appendix E of the ACUCOBOL-GT product documentation. If the file status (first two characters) is 30, the remainder of the information is the operating system's status code explaining what caused the error. On some systems, the operating system requires more than two digits for its status codes. That is why the C$RERR routine may be passed a field that is larger than four characters.

Whenever an error 30 occurs, the operating system's status value is returned in this extended field. The number returned is a left-justified decimal value. If the receiving field is too small, the right-most digits are returned. If the receiving field is too large, the excess characters are filled with spaces.

Previous Topic Next topic Print topic