EXEC VARA Objects

Use EXEC VARA objects as intermediaries that read and pass on the values returned by other executable objects. These values may affect the subsequent execution of objects or trigger the execution of objects. You store the readouts in the script variables that are defined in the EXEC VARA object. The VARA object itself has no input parameters.

This page includes the following:

Prerequisites

The names of the parameters in the EXEC VARA object and in the PromptSet of the executable object that supplies the return codes must be identical.

PromptSet variables are supported in select fields for BACKEND, EXEC, FILELIST, SEC_SQLI, SEC_SQL, SQLI, SQL, and XML variable types. Using PromptSet variables is necessary when using the Dynamic Reload (Combobox Prompts) feature.

Defining EXEC VARA Objects

An EXEC VARA object definition is made up of the following pages:

Variable Settings Section

Parameters Section

List of parameters and variables that are available in the executable object. Their values can be either:

Treat these parameters as though they were PromptSet/read buffer values. When a VARA object calls the executable object, it uses :PUT_PROMPT_BUFFER to set the specified parameters. To read and use these values in the called executable object, you must use the :READ command. This command reads in the values of variables of the same names. The values depend on the parameters that are set in the calling EXEC Variable object.

Important! It is not sufficient merely to define the variables on the Variables page under Variables & Prompts for the called executable object.

For more information, see :PUT_READ_BUFFER, :PUT_PROMPT_BUFFER.

Preview

To preview the variable, click Preview. A preview of the result values stored or transferred is displayed.

Examples:

Using an EXEC Variable in a Precondition

To use an EXEC variable in a precondition, do the following: 

  1. In an executable object, include code like the following:
  2. :SET &RET# = "Y"

  3. Create an EXEC variable and point it the executable object.
  4. Access the EXEC variable in either a:
    • Script with the following code, :SET &TEST# = GET_VAR (VARA.EXEC)
    • Prompt or precondition with, {VARA.EXEC}

Using an EXEC Variable As a Data Sequence

If you want to use an EXEC variable to pass a list of values (e.g. for using the result in a PromptSet dropdown):

In an executable object, in order to return a list of values, include something like the following:

:SET &HND# = CREATE_PROCESS(NEW)

! add the header line

:SET &CHECK# = PUT_PROCESS_LINE(&HND#, "Header A;Header B; Header C", ";")

!fill the process with another one!

:PROCESS &HND_SOURCE#

:   SET &CHECK# = PUT_PROCESS_LINE(&HND#, "Value1;Value 2; Value 3", ";")

:ENDPROCESS

! save process

:SET &RET# = SAVE_PROCESS(&HND#)

:PUBLISH &RET#,,TOP

:CLOSE_PROCESS(&HND#)

In the VARA.EXEC the executable object, point to the object with the content about. The return value would be set to &RET#.

See also: