Previous Topic: ConsiderationsNext Topic: Example: IMOD for Processing Operator Commands


Execute a Compiled IMOD Using SRVBATCH

To execute a compiled IMOD in batch mode, update the following sample JCL procedure to suit your requirements:

Note: All JCL statements that the CA-GSS primary subsystem supports are valid for SRVBATCH.

//          EXEC PGM=SRVBATCH,PARM='imod_name/arg_string'
//PARMLIB   DD DISP=SHR,DSN=CAI.CAW0OPTN(RUNPARM)
//ISRVLOG   DD SYSOUT=*
//IMOD      DD DSN=iset_dsn_1 
//SYSIN     DD …
SSNAME ISRV          
  ISET iset_name DSN iset_dsn_2 LOAD SSID ISRV
//

First Line: Replace imod_name with the name of the IMOD to be executed. Replace arg_string with a string to be passed as the initial argument and in the imod_msg.1 special variable. If no argument is to be passed, omit the slash (/).

Second Line: The data set referenced by the PARMLIB DD statement is identical to the data in the CA-GSS started task procedure. However, SRVBATCH does not support the INCLUDE initialization parameter. You can omit the data set without error. However, if you include it (for example, to test values), the values must be correct.

Note: To use the LOADIMOD() function to fetch IMODs, include the appropriate ISET initialization parameter statements. Alternatively, use the LOAD option of the ISET initialization parameter to load the IMODs in the ISET.

Third Line: The data set referenced by the ISRVLOG DD statement is identical to the data in the CA-GSS started task procedure. The data provides information about IMOD execution, and serves as the target for TRACE and SAY output. If the function is not required, you can omit this DD statement.

Fourth Line: The IMOD DD statement identifies the ISET that contains the IMOD specified in the PARM parameter. The statement is required only if the IMOD to be executed is not loaded by an ISET initialization parameter. If this value is specified and the IMOD is already loaded, the IMOD is reloaded.

Fifth Line: (Optional) When the stack is depleted, further PULL operations cause SRVBATCH to read data from SYSIN. A NULL record signals the end of the file. When a NULL record is returned, SYSIN is closed. A subsequent attempt to read data reopens it. SYSIN can be read multiple times.

You can test for a NULL record using the LENGTH() REXX built-in function or the == comparison operator.

Sixth Line: These last two JCL statements are required for loading IMODs.