//SYSTSIN DD *
DSN SYSTEM(<system>)
RUN PROGRAM(<program>) -
PARMS('<parm>') -
PLAN(<plan>)
I would really like to run a REXX that then launches the program. I
have been fairly close, and here is my JCL:
//STEP01 EXEC PGM=IKJEFT1B,
// PARM='%myrexx <system> <program> <plan> <parm>'
//SYSEXEC DD DSN=SDEV.PETWIR.REXX,DISP=SHR
//STEPLIB DD <lots_of_datasets>
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
WHY AM I DOING THIS?
=======================
My goal is to set it up so that items like <system> would only have to
be coded once per job stream.
e.g. // SET SYSTEM=<system>
// SET PLAN=<plan>
("SET" variables can not be used by non-JCL cards.)
THE PROBLEM WITH MY SOLUTION IS:
==============================================
When the REXX issues the "RUN PROGRAM..." instruction, I get RC=0012
back and it doesn't work. My software support staff tell me that I
won't be able to accomplish this without purchasing a 3rd party vendor
product, like SmartCAF.
MY QUESTION IS:
===================================
Does anyone out there have a way to launch a COBOL/DB2 batch program
without using SYSTSIN cards to TSO?
Looks feasible.
> When the REXX issues the "RUN PROGRAM..." instruction, I get RC=0012
> back and it doesn't work.
As RUN is a subcommand of the DSN command, you cannot issue RUN directly.
> My software support staff tell me that I
> won't be able to accomplish this without purchasing a 3rd party vendor
> product, like SmartCAF.
To me it sounds as if they assume that you want to EXEC PGM=<program>
without a Rexx driver program.
> Does anyone out there have a way to launch a COBOL/DB2 batch program
> without using SYSTSIN cards to TSO?
Something like this:
/* Rexx: Run DB2 program in batch */
Parse upper arg DB2ssid ProgName PlanName ProgParm
Address MVS "NEWSTACK"
Queue "RUN PROGRAM("ProgName") PLAN("PlanName") PARMS('"ProgParm"')"
Queue "END"
Address TSO "DSN SYSTEM("DB2ssid")"
DsnRC=RC
If DsnRC<>0 then
Say "DSN command failed RC="DsnRC
Address MVS "DELSTACK"
Exit DsnRC
Above code not tested, but I have used the queue technique for entering
subcommands several times.
The NEWSTACK/DELSTACK combo shout not be really needed in this short
program; but I prefer to code them whenever my Rexx programs use the
stack for own purposes.
Regards, Johnnie
there is a good assembler sample in the DB2 books.
Unfortunally you have to use DSNALI (Caf) as the DB2 interface/stub.
If you like to pass LE runtime options you need to a simple Cobol as the
first program
If you need a sample let me know
Roland
Pete