Example 2: ALERT-initiated CLIST EXEC with optional parameters


This example shows an IMFEXEC ALERT statement that schedules an EXEC named SETJOB with the optional parameter IMMEDIATE:

IMFEXEC ALERT KEYSETUP 'SETUP BAB031 . . . JOB 00395' + EXEC('SETJOB IMMEDIATE')

The ALERT generated by this statement looks like this example:

RSP   TIME  IND ORIGIN  --------------------------------------------
_____ 10:15 e   SYSB    SETUP BAB031 . . . JOB 00395

You enter OUT (or any maximum five-character string) in the RSP column. The positional parameters passed to the ALERT-initiated EXEC in this example are defined in the following table:

Example of ALERT-initiated EXEC parameters and variables

Positional Parameter

Variable name

Variable value

Description of variable value

1

EXECNAME

SETJOB

is the name of the EXEC

2

TIME

IMMEDIATE

is the optional parameter passed to the EXEC to specify when the job should be run

3

RSP

OUT (contents of the 5-character RSP column)

is the (up to) five-character string the user enters in the RSP column of the ALERT DETAIL DISPLAY panel to actually invoke the ALERT

4

ATEXT1

SETUP

is the first word of ALERT text

5

ATEXT2

BAB031

is the second word of ALERT text

 

ALERT-Initiated CLIST (Example 2)

PROC 5 EXECNAME TIME RSP ATEXT1 ATEXT2
/*********************************************************************/
/* DOC GROUP(MVS) FUNC(JES2) CODE(J2)                                */
/* DOC DISP(YES) AUTHOR(B&B)                                         */
/* DOC DESC(WRITE MESSAGE FOR SETUP & TIME)                          */
/*-------------------------------------------------------------------*/
IMFEXEC MSG 'ALERT &EXECNAME IS REQUESTING SETUP AT &TIME FOR &ATEXT2'
EXIT

 

Describing the example

This EXEC issues the IMFEXEC MSG command to write a message to the BBI-SS PAS Journal that, when all the values from the input are substituted for, translates into this example:

ALERT SETJOB IS REQUESTING SETUP AT IMMEDIATE FOR JOB 00395

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*