Previous Topic: Record an EXEC to Automate Info/Management InquiriesNext Topic: Build the Rest of the Driver Section Using Recording Commands


The Opening Text of the Driver Section for a Recorded EXEC

The driver section of this sample REXX EXEC contains the user-defined REXX code that drives EXEC execution, including subroutines created while recording the session.

The following illustration shows you the user-modifiable text of the first part of the driver section:

/* If you need to PARSE input parameters, use a statement similar to */
/* the following.                                                    */
/*                                                                   */
/* PARSE VAR parm parm_x "," parm_y "," parm_z .                     */
/*                                                                   */
/* The variable "parm" contains all input parms except "DEBUG" and   */
/* "PLAYBACK", which were stripped out in the unmodifiable           */
/* initialization section of this EXEC.                              */
/*-------------------------------------------------------------------*/
/* ----- You must include the following PARSE statement  --------    */
 PARSE VAR parm inc_#        /* inc_# is the name of a REXX variable */
/*-------------------------------------------------------------------*/
/* The following SESSCMD keywords are set via the O command on the EPI */
/* Recorder panel. STOPMSG is the only keyword not set from the panel. */
/* If using STOPMSG, then set the following STOPMSG variable:       */
/* STOPMSG = "STOPMSG(string1,string2,string3)"                     */
/*------------------------------------------------------------------*/
 CMDWAIT   = ''
 MAXCMDOUT = ''
 PREFIX    = ''
 TRUNCATE  = ''
 STOPMSG   = ''
/*-------------------------------------------------------------------*/
/* Call external function ATMOPOOL and set REXX variable epi_session */
/* The function will bind the session and return the CA OPS/MVS      */
/* session ID to use during the REXX procedure.                      */
/*-------------------------------------------------------------------*/
pool_returned_data = ATMOPOOL("POOL=INFOMAN" "HOME=YES")
PARSE UPPER VAR pool_returned_data epi_session home_rc
IF epi_session = '' THEN DO
  rc = "No sessions available for BIND"
  SIGNAL ERROR_HANDLER
END
IF home_rc > 4 THEN DO
  rc = "HOME_RC ="home_rc
  SIGNAL ERROR_HANDLER
END
/*-------------------------------------------------------------------*/
/* Call ATM_GETSCRN to fetch a screen.                               */
/*-------------------------------------------------------------------*/
CALL ATM_GETSCRN
/*-------------------------------------------------------------------*/
/* If PLAYBACK mode active, display first screen.                    */
/*-------------------------------------------------------------------*/
IF playback = "ON" THEN
  CALL PLAYBACK