HLL interactive programs should use messages to provide notification of an error; completion or a warning in response to each user request.
Messages should normally be placed on a program message queue sub file—CL programs may send messages directly, other HLL languages should use a standard CL message sending program or the V2R2 QMHSNDPM API.
The standard message handling technique can be illustrated as follows:

Thus, when an interactive HLL program needs to display a message at execution, it calls a message sender program, passing a message identifier and any necessary message data. The message sender sends the message back to the calling program’s message queue. Since the calling program has a message subfile based upon the message queue, the message will automatically be displayed.
Since HLL programs cannot send messages to their own message queues, the above technique requires the use of standard CL subprograms to:
The standard CA 2E message-sending program is as follows:
Source for the CA 2E Message Sender Program:

Note: For V2R2 onwards, you should use the QMHSNDPM API.
The standard CA 2E message-clearing program is as follows:
Source for the CA 2E Message Clearing Program:

From V2R2 onwards, you should use the QMHRMVPM API instead.
If multiple validation errors are detected, only the error message for the first field in error on the panel should be output, but all fields in error should be highlighted in reverse image. This is because sending an error message incurs a certain overhead; and in any case, an initial error often has a knock on effect on subsequent fields.


Associate an error indicator with each input capable field on the display. If an error is detected, this indicator should be set on and an error message sent.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |