Tags

,

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.

Important SQL CODES and ABEND CODES
SORT JOIN – TO JOIN TWO FILES BASED ON A KEY
KNOW YOUR MAINFRAME
REXX – INITIAL SETUP
EASYTRIEVE – A023 ABEND
EASYTRIEVE – SORT and FILE COMPARISION
EASYTRIEVE – Special-name Report Procedures
EASYTRIEVE – REPORT STAEMENT
EASYTRIEVE – Sample Program – Table And Search
EASYTRIEVE – Sample Program – Display Totals and Summary
EASYTRIEVE – Sample Program – Display Employee Data
CA-Easytrieve/Plus – Basics
REXX TOOL # 02 – FSAVE – Save member opened in VIEW mode
REXX TOOL # 01 – O – Open Any Mainframe Element from any ISPF Screen
REXX – INDEX, POS, SUBSTR, COMPARE
REXX – READ THE DSN PROVIDED AS DD IN JCL
REXX – SEND MULTIPLE ARGUMENTS THROUGH JCL
REXX – HOW TO COMPILE YOUR REXX EXEC
REXX – CHANGE UPPER TO LOWER CASE
REXX – GET LAST 4 DAYS FROM GIVEN DATE
REXX – PANEL Definition
REXX – READ, CREATE AND WRITE DATA TO A DATASET
REXX TOOL TO SUBSTITUTE SYMBOLICS IN A PROC
Advertisements