Tool-defined Resource Processing

If resource processing is specified as TOOL-DEFINED in the AWM model, the tool delivers information about the type of resource processing to the client application.

TOOL-DEFINED must be used in the following cases:
  • When the type of resource processing (such as Update or Insert) is only clear during run time of the tool, and can therefore not be modeled.
  • With generating tools (such as Compile tools) that can create several outputs from a single input resource and the outputs are to be processed by the client application.

The ISPF interface already provides a temporary empty ISPF table, in which the tools can store resource information.

The name of the temporary ISPF table is the value of the shared pool variable TAUTOTBI.

The table is not sorted and contains no key columns.

Column name Description
TAUTOFNC Resource Operation in the form:

operation(<refid>,<REFRESH>,<SELECT>)

The term in brackets is optional. 

operation =

INSERT-ELEMENT | REMOVE-ELEMENT | UPDATE-ELEMENT

The default value is UPDATE-ELEMENT

refid: A unique reference identifier for subsequent tools within an action. 

REFRESH: Refreshes all the element properties.  

SELECT: Selects the element in the client table or tree view.

See Tool-defined Resource Operations for more information and a description of the values.

TAUTOPRM List of property values as defined as element output parameters in the AWM model.
Resource Operation Description
INSERT-ELEMENT or INSERT-CHILD Checks whether the element is already known.

If the element does not yet exist, it is created and added to the list where the Input element is located. In the Application Explorer view the element can be added as a child element, if requested.

If the element already exists, the element properties are updated in line with the output parameters for the tool and, where necessary, the added to the list in which the input element is located.    

REMOVE-ELEMENT Removes the element from all AWM element lists.
UPDATE-ELEMENT Updates an element that already exists with the values returned by the tool.

If the element does not exist in the same list as the input element, it is not added (compare INSERT-ELEMENT).

Tools can generate rows with the ISPF Table Service TBADD in the ISPF table, which is empty at the time of the tool call-up. Tools may not close this table with TBEND or TBCLOSE.  

REXX Example

/* Update compiled element and insert compile output elements */
Parse Arg inpds inmem . 
. . . . 
/* Do the compile and create a list with output members in stem bldrec. */ 
. . . . 
Address ISPEXEC 'VGET (TAUTOTBI) SHARED'        /* get temp. table name */ 
 
tautoprm = inpds inmem 
tautofnc = 'UPDATE-ELEMENT(COMP_IN,REFRESH,SELECT)' 
Address ISPEXEC 'TBADD' tautotbi 
Do i = 1 To bldrec.0 
   Parse Value bldrec.i With outpds outmem . 
   tautoprm = outpds outmem 
   tautofnc = 'INSERT-ELEMENT' 
   Address ISPEXEC 'TBADD' tautotbi 
   End 
 
. . . .