Reason codes for IBM i (ILE RPG)
The reason code parameter (REASON) is a qualification to the completion code parameter (CMPCOD).
If there is no special reason to report, RCNONE is returned. A successful call returns CCOK and RCNONE.
If the completion code is either CCWARN or CCFAIL, the queue manager always reports a qualifying reason; details are given under each call description.
Where user exit routines set completion codes and reasons, they should adhere to these rules. In addition, any special reason values defined by user exits should be less than zero, to ensure that they do not conflict with values defined by the queue manager. Exits can set reasons already defined by the queue manager, where these are appropriate.
Reason codes also occur in:
For the full list of reason codes, see API completion and reason codes.
To find the IBM i reason code in that list, remove the "RC" from the front, for example RC2002 becomes 2002. Also the completion codes there are shown as they are on other platforms:IBM i | Other platforms |
---|---|
CCOK | MQCC_OK |
CCWARN | MQCC_WARN |
CCFAIL | MQCC_FAIL |