Retrieving data from a variable pool

This section describes how and why you can retrieve information from a variable pool with EXECs.

Potential use

There are many instances when you might want to create EXECs to notify individuals or groups of individuals about serious operations situations.

It is advantageous to create these notifications in a general way so that they refer to a title or a group name, but you can also write an EXEC that notifies specific individuals by name when a situation occurs.

Variable pools provide this capability by allowing you to store variable data such as names and phone numbers and retrieve them later.

Describing the example

This EXEC retrieves the name, user ID, and telephone numbers of the IMS systems programmer from the PROFILE pool where it was saved is the Example.

The VGET statement retrieves the variable IMSPROG from the PROFILE pool. Because it was saved and retrieved as a list variable, the data is mapped in the variables NAME, USERID, and so on.

The data retrieved from IMSPROG is used to fill in the variable fields needed in the ALERT command. Finally, a return code is set to zero and the EXEC exits.

Example

The following section shows examples of retrieving variables from a variable pool.

REXX EXEC example:

/* REXX EXEC */
/******************************************************************/
/* DOC GROUP(MVS) CODE(J2) */
/* DOC DISP(YES) AUTHOR(B&B) */
/* DOC DESC(RETRIEVING VARIABLES) */
/******************************************************************/

'IMFEXEC VDCL IMSPROG LIST(NAME USERID WORKPHON HOMEPHON PAGER)'
'IMFEXEC VGET IMSPROG INTO(IMSPROG) PROFILE'
'IMFEXEC ALERT IMSPROG'TIME()'',
         ''IMSPROG IS NEEDED. CALL 'NAME' AT /N 'WORKPHON' OR',
         ''HOMEPHON''' 'FUNCTION(ADD) PRI(MAJOR) QUEUE(IMSPROG)'
'IMFEXEC EXIT CODE(0)'
EXIT

CLIST example:

PROC 0
/*********************************************************************/
/* DOC GROUP(MVS) CODE(J2)                                           */
/* DOC DISP(YES) AUTHOR(B&B)                                         */
/* DOC DESC(RETRIEVING VARIABLES)                                    */
/*********************************************************************/
IMFEXEC VDCL IMSPROG LIST(NAME USERID WORKPHON HOMEPHON PAGER)
IMFEXEC VGET IMSPROG INTO(IMSPROG) PROFILE
IMFEXEC ALERT IMSPROG||&SYSTIME +
         'IMSPROG IS NEEDED.  CALL &NAME AT /N &WORKPHON OR +
         &HOMEPHON' FUNCTION(ADD) PRI(MAJOR) QUEUE(IMSPROG)
IMFEXEC EXIT CODE(0)
EXIT

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Comments