EXEC-initiated CLISTs
An EXEC-initiated EXEC is scheduled when the IMFEXEC SELECT command is coded, specifying the EXEC parameter.
The EXEC parameter names the EXEC to be scheduled along with any parameters; for example:
where execname is the name of any EXEC to be scheduled.
Potential use
Use an EXEC-initiated EXEC when you want to
- schedule a common EXEC that might be used by several other EXECs
schedule another EXEC and have it execute asynchronously
EXEC-initiated EXECs can be scheduled to execute either synchronously or asynchronously by the calling EXEC. For more information, see Invoking-EXECs-synchronously-with-IMFEXEC-SELECT-EXEC-WAIT-YES.
Parameters passed to the EXEC
The first positional parameter is the one- to eight-character name of the EXEC.
Any following positional parameters are optional.
Example of Input
The command
schedules the EXEC called START for execution. An optional parameter containing the value BS4000 is passed to START as input.
Example
This example shows the calling EXEC that schedules the called EXEC named START:
/*********************************************************************/
/* DOC GROUP(MVS) FUNC(VTAM) CODE(VT) */
/* DOC DISP(YES) AUTHOR(B&B) */
/* DOC DESC(CALL ACTIVATE EXEC) */
/*-------------------------------------------------------------------*/
IMFEXEC SELECT EXEC(START BS4000)
EXIT
This example shows the called EXEC:
Figure 1. EXEC-Initiated CLIST example
/*********************************************************************/
/* DOC GROUP(MVS) FUNC(VTAM) CODE(VT) */
/* DOC DISP(YES) AUTHOR(B&B) */
/* DOC DESC(ACTIVATE THE NODE) */
/*-------------------------------------------------------------------*/
IMFEXEC CMD #VARY NET,ACT,ID=&TERMID
EXIT
The positional parameters passed to the PROC statement of the user-initiated EXEC are shown in the following table:
Positional Parameter | Variable name | Value passed | Description of value passed |
|---|---|---|---|
1 | START | START | is the name of the EXEC |
2 | TERMID | BS4000 | is the name of the terminal to be started online |
Describing the example
In this example, an EXEC is scheduling another EXEC for execution with the IMFEXEC SELECT command.
The called EXEC in this example receives a parameter from the calling EXEC (BS4000) and uses that value to vary a VTAM node active with the IMFEXEC CMD command. Refer to CMD for more information about the IMFEXEC CMD statement and MVS commands.