Page 1 of 1

REXX macro to submit JCL

PostPosted: Thu Jun 11, 2009 5:53 pm
by Mt68074
Hi,
I need a REXX macro to submit JCL of a COBOL program(not having DB2).JCL is having three steps.COMPILE , LINK & RUN.A flat file is input to the program, which then creates output report.I am new to REXX so please elaborate the necessary steps.

Re: REXX macro to submit JCL

PostPosted: Thu Jun 11, 2009 6:09 pm
by MrSpock
Huh???

REXX is a programming language. It doesn't submit jobs. Jobs have to be read and placed into the JES Internal Reader, which scans the code, syntax checks it, abd then re-formats it into code that JES understands. REXX doesn't do any of this.

Maybe I don't understand what you're asking for?

Re: REXX macro to submit JCL

PostPosted: Thu Jun 11, 2009 6:10 pm
by swd
Why use a REXX to submit a batchjob? Why not just have an IEBGENER step to do this, such as

//S999   EXEC PGM=IEBGENER                           
//SYSIN    DD DUMMY                                   
//SYSPRINT DD SYSOUT=*                               
//SYSUT1   DD DSN=USERID.TEST.CNTL(MEMBER1),DISP=SHR 
//SYSUT2   DD SYSOUT=(A,INTRDR)

Re: REXX macro to submit JCL

PostPosted: Thu Jun 11, 2009 6:17 pm
by Mt68074
Is it possible to execute a program using REXX ??

Re: REXX macro to submit JCL

PostPosted: Thu Jun 11, 2009 6:25 pm
by MrSpock
Mt68074 wrote:Is it possible to execute a program using REXX ??


It depends. You run programs all the time is TSO, right? And, in ISPF, right? And you know that a REXX exec running in a TSO address space can invoke TSO commands, and that a REXX exec running in an ISPF address space can invoke both TSO and ISPF commands, right? So, a REXX exec running in either a TSO or ISPF address space can execute a program by using the same TSO or ISPF commands.

If the exec is running pure REXX, (i.e. you're using the IRXJCL REXX Interpreter program) then yes, there are some built-in functions for program invocation.

Re: REXX macro to submit JCL

PostPosted: Thu Jun 11, 2009 10:12 pm
by Mt68074
Thank you for the details. :)