REXX – HOW TO COMPILE YOUR REXX EXEC
You have developed a REXX exec which can be used by your team and you would like to place it in a common library so everyone can make use of it. But you do not want someone else to modify it unintentionally. So for this you can convert your EXEC to a CEXEC (Compiled exec) which do not directly have your REXX exec code.
Below is the COMPILE job that you need to make use of to create the CEXEC.
NOTE: The PROC REXXC is being used here for compiling your REXX exec. Before running this compile job, ensure you have the member REXXC in PDS like SYS1.PROCLIB or SYS1.REXX.*.
//JOBCARD
//*
// JCLLIB ORDER=
SYS1.PROCLIB
//*****************************************************************
//*** COMPILE REXX
//*****************************************************************
//S1 EXEC REXXC,COMPDSN=SYS1.REXX
//REXX.SYSCEXEC DD DSN=YOUR.REXX.CEXEC(FIRSTREX),DISP=SHR
//REXX.SYSPUNCH DD DSN=YOUR.REXX.OBJ(FIRSTREX),DISP=SHR
//REXX.SYSIN DD DSN=YOUR.REXX.EXEC(FIRSTREX),DISP=SHR
Where
YOUR.REXX.EXEC – Your PDS having your REXX EXEC
YOUR.REXX.CEXEC – Define this PDS with RECFM=FB and LRECL=80
YOUR.REXX.OBJ – Define this PDS with RECFM=FB and LRECL=80
COMPDSN is the PDS name where you have your program REXXCOMP which is used for compiling.
Once you run the compile job, the member would be automatically created in YOUR.REXX.CEXEC and YOUR.REXX.OBJ.
Now you can execute your CEXEC by just providing EX before your EXEC “FIRSTREX” in YOUR.REXX.CEXEC. Or use this in a batch job as below.
//JOBCARD
//*
//STEP02 EXEC PGM=IKJEFT01
//STEPLIB DD DSN=YOUR.REXX.OBJ,DISP=SHR
//SYSPROC DD DSN=YOUR.REXX.EXEC,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
EX ‘YOUR.REXX.CEXEC(FIRSTREX)’ ‘NAME’
/*
This CEXEC can be copied into your common library to save your REXX exec from unwanted deletes or modifications.
——————————————————————————————————–
In United States, If you would like to Earn Free Stocks, Credit card Points and Bank account Bonuses, Please visit My Finance Blog
——————————————————————————————————–
You may also like to look at:
Working on Mainframes – Is Change to a different technology necessary |