The return code

The return code from the sample COBOL exit is first set into a WORKING STORAGE variable RAM-RC, and at the end of the exit is placed into the special register RETURN-CODE.

Here are the possible return codes from the exit:

WORKING-STORAGE SECTION.

77 RAM-RC PIC S9(9) COMP.
   88 RAM-RC-OK VALUE 0.
   88 RAM-RC-UNKNOWN-OPCODE          VALUE 999.
   88 RAM-RC-REP-NOT-FOUND           VALUE 116.
   88 RAM-RC-INTERNAL-ERROR          VALUE 100.
   88 RAM-RC-REP-NOT-SUPPORTED       VALUE 120.
   88 RAM-RC-REP-IN-USE              VALUE 124.
   88 RAM-RC-MEM-ID-SPEC-BAD         VALUE 156.
   88 RAM-RC-REP-UNAVAIL-UNKNOWN     VALUE 132.
   88 RAM-RC-EOF                     VALUE 180.
   88 RAM-RC-REP-ERROR               VALUE 136.
   88 RAM-RC-BAD-FILTER              VALUE 152.

The return codes have the following meanings:

RAM-RC-UNKNOWN-OPCODE
Indicates that the requested function is not supported by the exit.
RAM-RC-REP-NOT-FOUND
Indicates that the library was not found. If the library name was a data set name, this means the data set was not found.
RAM-RC-INTERNAL-ERROR
Indicates some internal error occurred in the exit itself.
RAM-RC-REP-NOT-SUPPORTED
The library is not supported by this exit. File Manager should try to access the library using other access methods such as CA-Panvalet or PDS access.
RAM-RC-REP-IN-USE
The library is in exclusive use.
RAM-RC-MEM-ID-SPEC-BAD
The Member Identifier Specification (the member name) parameter was not useable.
RAM-RC-REP-UNAVAIL-UNKNOWN
The library is unavailable for unknown reasons.
RAM-RC-EOF
Normal End Of File was received during the process of extracting member records or getting member information or metadata (for a member selection list).
RAM-RC-REP-ERROR
Some error occurred in the library.
RAM-RC-BAD-FILTER
The "filter" argument to the GetMemberInfo calls, which is a member name with optional wildcard characters, was bad.