Display Messages
System: GENSYS9
Queue . . . . . : QPGMR Program . . . . : ᑍDSPMSG
Library . . . : QUSRSYS Library . . . :
Severity . . . : Delivery . . . : ᑍHOLD
Type reply (if required), press Enter.
From . . . : SMITH 7/25/94 11:1:12
No such ᑍJOBD exists
If another exception occurs (for example, a library name that is not valid), you do
not receive an indication that an error occurred because of the way the error sub-
routine is currently coded.
In addition, you can use the Message Handling APIs to receive the messages sent
to your program message queue.
The call to the API fails if you specify a valid job description but use a library qual-
ifier such as *ALLUSR. The value *ALLUSR is not supported by the description of
the required parameter group.
Retrieving the Hold Parameter (Error Code Structure)—OPM RPG
Example
In the program example in “Retrieving the Hold Parameter (Exception
Message)—OPM RPG Example,” QUSBNB (6 on page 3-7) was set to a value of
binary zero to tell the API to send exceptions (escape messages) for any error con-
ditions. The example in this topic uses an error-code data structure as an alterna-
tive to receiving exceptions.
Some languages do not support the use of exceptions, so you may prefer to code
for errors using error code structures.
In your programs, you can use error code structures in the following ways:
Define an 8-byte error code structure that provides feedback on whether an
error occurred. If an error does occur, you are not able to determine the spe-
cifics of the problem.
Define a 16-byte error code structure that allows you to determine if an error
exists and to access the exception message ID. The exception message IDs
are the same as shown in “Error Messages” on page 3-36.
Define a larger than 16-byte error code structure that provides the same infor-
mation as described in the previous two error code structures as well as some
or all of the exception data. The exception data is the message data that is
sent with the exception message. Because the vast majority of exception mes-
sages do not have more than 512 bytes of message data, a 600-byte error
code structure would be adequate for almost all cases.
Note: Lengths of 1 through 7 bytes are not valid for the error code structure.
Chapter 3. Common Information across APIs—Basic (OPM) Example 3-11