Previous Topic: Considerations

Next 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 supported by the CA-GSS primary subsystem 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
//

Œ Replace imod_name with the name of the IMOD to be executed, and arg_string with a string to be passed both as the initial argument and in the imod_msg.1 special variable. Omit the slash (/) if no argument is to be passed.

 The data set referenced by the PARMLIB DD statement is identical to that 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, because you want to test or specify values), specified values must be correct.

Note: If you use the LOADIMOD() function to fetch additional IMODs, you must include the appropriate ISET initialization parameter statements. Alternatively, you can use the LOAD option of the ISET initialization parameter to load all the IMODs in the ISET.

Ž The data set referenced by the ISRVLOG DD statement is identical to that in the CA-GSS started task procedure. It provides information on IMOD execution, and serves as the target for TRACE and SAY output. You can omit this DD statement if the function is not required.

 The IMOD DD statement identifies the ISET that contains the IMOD specified in the PARM parameter. It is required only if the IMOD to be executed is not loaded by an ISET initialization parameter. If it is specified and the IMOD is already loaded, the IMOD is reloaded.

 (Optional) When the stack is depleted, further PULL operations cause SRVBATCH to read data from SYSIN. End of file is signaled by the return of a NULL record. When a NULL record is returned, SYSIN is closed, and 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.

These last two JCL statements are required for loading IMODs.