Return Value to JCL (Batch Job) from REXX.



IBM's Command List programming language & Restructured Extended Executor

Return Value to JCL (Batch Job) from REXX.

Postby bazzigar » Mon Aug 20, 2012 5:44 am

Hi,

I have a REXX code which is invoked by a JCL/ Batch program. I would like to return a value from REXX to the Batch program.
How can I get it done.Appriciate your help.

Thanks,
bazzigar
 
Posts: 29
Joined: Sat Feb 11, 2012 7:20 am
Has thanked: 0 time
Been thanked: 0 time

Re: Return Value to JCL (Batch Job) from REXX.

Postby dick scherrer » Mon Aug 20, 2012 6:53 am

Hello,

Running this:
//TSO1    EXEC PGM=IKJEFT1B,DYNAMNBR=20                       
//SYSEXEC  DD DISP=SHR,DSN=MYDUMB.TEST.REXXLIB       
//SYSPRINT DD SYSOUT=*                                       
//SYSOU1   DD SYSOUT=*                                       
//SYSTSPRT DD SYSOUT=*                                       
//SYSTSIN  DD *                                               
SETRC 17                                                     
/*   


The SETRC REXX code:
/* REXX */   
RETURN ARG(1)


Produces this:
IEF236I ALLOC. FOR MYREXXRC TSO1                                 
IGD103I SMS ALLOCATED TO DDNAME SYSEXEC                         
IEF237I JES2 ALLOCATED TO SYSPRINT                               
IEF237I JES2 ALLOCATED TO SYSOU1                                 
IEF237I JES2 ALLOCATED TO SYSTSPRT                               
IEF237I JES2 ALLOCATED TO SYSTSIN                               
IEF237I 80A2 ALLOCATED TO SYS00001                               
IEF285I   SYS1.UADS                                    KEPT     
IEF285I   VOL SER NOS= C1101B.                                   
IEF142I MYREXXRC TSO1 - STEP WAS EXECUTED - COND CODE 0017   


Maybe incorporating this will do what you want. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Return Value to JCL (Batch Job) from REXX.

Postby bazzigar » Mon Aug 20, 2012 6:58 am

Thanks a lot dick ;)
bazzigar
 
Posts: 29
Joined: Sat Feb 11, 2012 7:20 am
Has thanked: 0 time
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post