A tablesONLINE user exit program may return a message code such as TB-5934 to indicate a problem. This message code is made up of a message group, in this case TB- and a message number 5934. These fields are the key fields for the messages table. When a message code is returned, tablesONLINE searches the message table for a row with the specified key and displays the appropriate message.
tablesONLINE is delivered with two message groups: TB- and TBS. These are tablesONLINE and tableBASE message groups respectively and should not be deleted by the user. When creating customized messages for an application, simply add to the existing Message table, to create a unique message group for your application and to create new messages within that group.
As with a Help table, it is possible to create a multi-line message, using the message sequence number. Messages are retrieved using the message group and message number as the key, and are displayed in the order indicated by the sequence number.
You can create four types of messages (see Table 175)
Type |
Description |
---|---|
I |
Information |
W |
Warning |
E |
Error |
A |
Abend |
A message type must be specified for each entry in the message table. Each type of message is handled differently by tablesONLINE.
After delivering an information or warning message, tablesONLINE attempts to continue processing as if there had been no message. These message types differ in that information messages may be suppressed for a user using the SUPPRESSINFO Y command. This option may be modified by the User by updating the Profile (see Edit Profile).
When an error message occurs, tablesONLINE attempts to restore the system to the state that existed before the program generating the message was called, so that the user can perform a different action. If the message type is abend, the task abends and no further actions may be carried out.
Display Attribute and Display Extended Attributes are used to assign the screen attributes to be used when displaying the message text. How and whether these features can be used will depend on your own installation.
It is possible to create messages that can accommodate additional strings when invoked by a user exit program. The Variable Offset fields tell the message-handler where to put these additional strings. In the example, a first string overlays the Xs starting at the character position specified by the first variable offset, while a second string will overlay the Xs starting at the character position specified by the second variable offset. A value of zero for either of these offsets will suppress the substitution of variable data into the message.