Previous Topic Next topic Print topic


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. Therefore it is not recommended to pass tool messages as output parameters to AWM.

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

There are two ways how to support this.

If only one message should be passed to AWM, the tool can define the specific ISPF Shared Pool Variable TAUTOMS with the desired 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 Meaning
TAUTOMTY Message type (optional)

T: tool message (default)

V: validation message

TAUTOSER Message severity (optional)

I: information

W: warning

E: error (default)

TAUTOMSG Message text (mandatory)
TAUTOVPO Position of the incorrect parameter (optional)

Maybe a comma separated list of positions

Default: 1

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 Meaning
rc = 0 Information dialog
0 < rc <= max RC in application options Warning dialog
Rc > max RC in application options Error dialog

The topic Relationship: Tool has Validate Action describes how validation messages are processed by the client.

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

REXX Example 3:

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