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 example shows a sample JCL of using the REXX batch processor to execute a Platform Server REXX exec.
- Enclose the PARM statement in single quotation marks.
- Code the characters up to column 71.
- Continue the PARM statement on the next JCL card starting in column 16.
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 then contains 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
Advantages and Disadvantages
The following are advantages and disadvantages of using the REXX batch processor:
- Advantages
- You can use this method in an unattended production environment.
- Return code processing can be used to check the status of the request.
- You can perform a process override to change the PARM statement.
- Disadvantages
- Only one command can be entered on the PARM statement.
- The PARM statement restriction of 100 characters might limit the command requested.
- You cannot execute certain TSO commands such as ALLOC and FREE in this environment.