Using the REXX Batch Processor (IRXJCL)
You can execute the platform server REXX execs by submitting JCL that executes the REXX batch processor, IRXJCL.
The REXX batch processor (IRXJCL) can be used to execute REXX commands. The input to the IRXJCL program are embedded in the PARM statement of the EXEC JCL card. The platform server execs can be entered directly on the PARM JCL statement or called by another exec. However, only REXX execs can be executed directly from the PARM statement; no REXX keywords can be used within this environment. This means that you can execute the platform server commands directly within the PARM statement, but if you want to use REXX keywords such as IF and DO, you must add the exec to a member of the EXECS, and execute that exec from the IRXJCL PARM.
Examples
The following examples show how to run REXX execs from the REXX batch processor:
Example 1:
//jobcard JOB ,' ',MSGCLASS=X,CLASS=A //S1 EXEC PGM=IRXJCL, // PARM=’exec to be executed’ //STEPLIB DD DSN=FUSION.LOADLIB,DISP=SHR //SYSEXEC DD DSN=FUSION.EXECS,DISP=SHR //SYSTSPRT DD SYSOUT=* //SYSTSIN DD DUMMY //
This example shows a sample JCL needed for processing the REXX batch processor.
Example 2:
//jobcard JOB ,' ',MSGCLASS=X,CLASS=A //S1 EXEC PGM=IRXJCL, // PARM=’FUSSEND IPADDR=192.192.192.100 IPPORT=46464 LF=local.file // RF=remote.file INTERVAL=3 SAY CFG=fusion wait’ //STEPLIB DD DSN=FUSION.LOADLIB,DISP=SHR //SYSEXEC DD DSN=FUSION.EXECS,DISP=SHR //SYSTSPRT DD SYSOUT=* //SYSTSIN DD DUMMY //
This examples shows a sample JCL of using the REXX batch processor to execute a platform server REXX exec.
Example 3:
//jobcard JOB ,' ',MSGCLASS=X,CLASS=A //S1 EXEC PGM=IRXJCL,PARM=’SENDPROD’ //STEPLIB DD DSN=FUSION.LOADLIB,DISP=SHR //SYSEXEC DD DSN=FUSION.EXECS,DISP=SHR //SYSTSPRT DD SYSOUT=* //SYSTSIN DD DUMMY //
This example shows a sample JCL of executing a REXX exec that is a member of the EXECS file. Member SENDPROD of the platform server EXECS library will then contain the following REXX exec:
/* REXX */ FUSSEND 'IPADDR=192.192.192.100 IPPORT=46464 LF=local.file’, ‘RF=remote.file INTERVAL=3 SAY CFG=fusion wait’ IF RC = 0 THEN DO SAY '0 RETURN CODE FROM FUSSEND' EXIT 0 END ELSE DO SAY 'RETURN CODE FROM FUSSEND=' RC EXIT 8 END