The following information is in support of my article in the January 2004 issue of the Magazine "Technical Support". For more information on the magazine go to http://www.naspa.com/
Steps for setting up your REXX PDS
1. Log onto TSO
2. Make up a name for your first REXX program. Be sure it's not already being used.
From the READY prompt:
BRCM IKJ56500I COMMAND BRCM NOT FOUND READY |
<=== You enter <=== System Responds < |
If the system finds the command BRCM, then try another name until you receive a System Response similar to the above, and everywhere BRCM occurs below you substitute your command name.
3. Create your REXX library.
From the READY prompt:
ALLOCATE
DATASET('@WCS001.EIN.REXX') CATALOG LRECL(255) BLKSIZE(2550) RECFM(V B) DSORG(
Where @WCS001 is your TSO logon ID and EIN is your initials. (The naming standards for creating TSO datasets may be different at your installation). Note the 255 LRECL, no more 80 character limitation.
4. Create '@WCS001.EIN.REXX(BRCM)' using any technique you desire. Within this member key in the following:
/* REXX */ say "Hey! What's going on?" exit |
Save, and exit.
5. Next you must check if SYSEXEC is already allocated thus:
What's on the screen |
Explanation |
At the READY prompt |
|
LISTALC STATUS --DDNAME---DISP-- PLASD.CLIST SYSPROC KEEP TSOPROC.CLIST KEEP SYS1.ISP.VB.SISPCLIB KEEP SYS1.ISP.VB.SISPEXEC KEEP SYS1.VB.SBPXEXEC KEEP SYS1.VB.SIOEEXEC KEEP SYS1.VB.SEUVEXEC KEEP SYS1.SASUEXEC KEEP SYS1.VB.BLKCLIB KEEP SYS2.HELP SYSHELP KEEP SYS1.HELP KEEP @WCS001.@WCS001.JOB11604.D0000009.? SYSUDUMP DELETE TERMFILE SYSTERM PLASD.RF.ABENDAID ABNLTERM KEEP SYS1.BRODCAST SYS00001 KEEP,KEEP @WCS001.ST1.ISPF.PROFILE ISPPROF KEEP @WCS001.BAW.REXX SYSEXEC KEEP READY |
<=== You enter <=== System responds < <=== File allocated to SYSPROC < <=== SYSPROC DDname < <=== More files allocated to < SYSPROC < etc. < < etc.(concatenated DDs) < < < < < < < < < < < < <=== SYSHELP file < <=== SYSHELP DDname < <=== SYSHELP file < < < etc. < < < < < < < < <=== File allocated to SYSEXEC < <=== SYSEXEC DDname < |
6. With the information gained in step 5 we now know how to allocate our new REXX PDS.
If SYSEXEC is already allocated, as in this example, then you:
ALTLIB RESET
ALTLIB ACTIVATE APPLICATION(EXEC) DATASET('@WCS001.EIN.REXX')
Otherwise you:
ALLOCATE DD(SYSEXEC) DATASET('@WCS001.EIN.REXX') SHR
7. Now, try out your command:
BRCM HEY! WHAT'S GOING ON? READY |
<=== You enter <=== System Responds < |
8. You've just written and executed your first REXX exec for this new library. You now have a REXX library within which to put all the REXX execs that you will write. The above ALTLIB or ALLOCATE command can be placed into your TSO profile so that you will not have to key it in each time you logon to TSO. If you don't want to place it into your profile then you could create an exec which contains the command (ALTLIB or ALLOCATE). For example:
You create '@WCS001.EIN.REXX(ALLREXX)' exactly as follows:
/***************************** REXX *******************************/ /* Bruce A. Woodworth ALLREXX July 25, 2003 */ /* */ /* This REXX Exec adds '@WCS001.EIN.REXX' to the Exec search path.*/ /* */ /******************************************************************/ trace off
"altlib reset" "altlib activate application(exec) dataset('@WCS001.EIN.REXX')" exit |
Normally, to execute one of your execs you would just key in the member name (ALLREXX in this example) and hit enter. However, when you first logon, your REXX library has not been allocated (again, assuming that you didn't place the above commands into your TSO PROFILE CLIST) and the system will not be able to find your exec. Therefore, you would execute your new exec from the READY prompt thus:
EX '@WCS001.EIN.REXX(ALLREXX)' EX READY |
<=== You enter <=== system responds |
At this point you can now execute any other exec from your library by just keying in the REXX member name.