Messages

Output parameters are only interpreted by AWM if the return code of the attached tool is not higher than the maximum permitted return code specified in the AWM model. Micro Focus recommends that you do not pass tool messages as output parameters to AWM.

If the tool ends with an error or with warnings only messages should be output.

There are two methods that can support this.

If only one message is to be passed to AWM, the tool can be defined with the specific ISPF Shared Pool Variable TAUTOMS with the required message text.

REXX Example 1

/* tool execution finished with errors */
outparm = '' 
exitrc = 8
tautoms = 'Here is my error message.'Address ISPEXEC 'VPUT (TAUTOMS) SHARED' 
Exit exitrc outparm

REXX Example 2

/* tool execution finished with warnings */
outparm = 'PARM1 PARM2 PARM3' 
exitrc = 4 
tautoms = 'Here is my warning message.'Address ISPEXEC 'VPUT (TAUTOMS) SHARED' 
Exit exitrc outparm

If a tool has more than one line of output messages or a message has to be returned to a modeled validation action, it can use the ISPF table TAUTOTBM to pass the messages to AWM. This ISPF table is provided by the AWM ISPF interface and is empty when the tool is called.

This ISPF table is not sorted and contains no key columns.

The structure of the ISPF table is as follows:

Column Description
TAUTOMTY Message type (optional)
T
Tool message (default)
V
Validation message
TAUTOSER Message severity (optional)
I
Information
W
Warning
E
Error (default)
Note: Only relevant if message type is V.
TAUTOMSG Message text (mandatory)
TAUTOVPO Position of the incorrect parameter (optional)

May be a comma separated list of positions.

Default: 1

Note: Only relevant if message type is V.

In this ISPF table, two different types of messages can be stored. The first and standard type is a tool message. The second type is a validation message.

The difference between the two types is the way they are processed by the client.

The tool messages of all the tools of an action are gathered. If at least one tool of an action returns tool messages, the gathered messages are displayed in a dialog window at the end of the action execution. The type of the dialog depends on the maximum return code of the tools in the action as listed in the following table:

Column Description
rc = 0 Information dialog
0 < rc <= max RC in application options Warning dialog
Rc > max RC in application options Error dialog

See Validate Action for more information on message validation.

REXX Example 3

The following REXX example shows how a validation message can be returned. 

ADDRESS ISPEXEC 'VGET (TAUTOTBM) SHARED'
tautomty = 'V' 
tautomsg = 'Unfiltered member selection may produce a large output.' 
tautoser = 'W' 
tautovpo = '5' 
ADDRESS ISPEXEC 'TBADD' tautotbm