REXX RC in Batch



IBM's Command List programming language & Restructured Extended Executor

REXX RC in Batch

Postby pranabpathsk » Fri Sep 10, 2010 2:00 pm

Hi,

I have created a REXX to be run in batch. I have set Return Code for any error. But, irrespective of these return code, when the REXX is run through JCL, it is always giving Return Code as 0. Is there any way so that we the JCL will give return code as set in REXX ?
pranabpathsk
 
Posts: 1
Joined: Sun Jul 18, 2010 3:58 pm
Has thanked: 0 time
Been thanked: 0 time

Re: REXX RC in Batch

 

Re: REXX RC in Batch

Postby MrSpock » Fri Sep 10, 2010 2:47 pm

It should. Could you show how you call your exec in the JCL and how you've coded the exec.
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: REXX RC in Batch

Postby NicC » Fri Sep 10, 2010 11:11 pm

I believe you have to execute it not through IKJEFT01 but one of the other flavours of IKJEFT - 1A perhaps??? You would have to read the manual to find out.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: REXX RC in Batch

Postby sricsc » Fri Oct 08, 2010 6:56 am

Hi All,

I tried to execute REXX Exec through JCL. In the REXX Exec, i'm doing the reading VSAM file & Writing into Seq. file. When i'm executing the REXX sepeartely, its running fine. When executing thru IEJKTF01, Job has ran sucessfully, but nothing has in O/P File.

Pls advise for me..

//TMP EXEC PGM=IKJEFT01,DYNAMNBR=30,REGION=4096K     
//SYSEXEC DD DSN=MYID.FDJ18.STATUS,DISP=SHR         
//SYSPRINT DD SYSOUT=*                               
//SYSTSPRT DD SYSOUT=*                               
//IN  DD DSN=MYID.ROR1.FDJ18.CL,DISP=SHR             
//OUT DD DSN=MYID.TEST.STATUS.A,DISP=OLD             
//SYSTSIN DD *                                       
PROFILE PREFIX(MYID)                                 
%START                                               


REXX ..

ADDRESS TSO "EXECIO" y.0 "DISKW OUT (FINIS STEM Y."   
Thanks,
Sri
sricsc
 
Posts: 13
Joined: Sat Aug 08, 2009 7:07 am
Has thanked: 0 time
Been thanked: 0 time

Re: REXX RC in Batch

Postby dick scherrer » Fri Oct 08, 2010 7:01 am

Hello,

How are you "executing the REXX sepeartely"?

What does a trace show?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: REXX RC in Batch

Postby sricsc » Fri Oct 08, 2010 8:32 am

By using command EX before the member. Its runs fine & writing O/P in the PS File.

But its not working through JCL. So My doubt is writing the data (in the form of STEM Variables) is possible or not in the Batch.
Thanks,
Sri
sricsc
 
Posts: 13
Joined: Sat Aug 08, 2009 7:07 am
Has thanked: 0 time
Been thanked: 0 time

Re: REXX RC in Batch

Postby dick scherrer » Fri Oct 08, 2010 9:01 am

Hello,

By using command EX before the member. Its runs fine & writing O/P in the PS File.
Is this EX in a batch job or an online tso/ispf session?

Is there some reason you have not run a trace of the problem run and posted what this shows (as requested earlier)?

Done correctly, stem variables work in batch.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: REXX RC in Batch

Postby NicC » Fri Oct 08, 2010 10:05 am

You show one line of rexx code. You do not show where Y. is being populated. How do you know that the rexx is running OK - IKJEFT01 does not pass on the return code from rexx.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: REXX RC in Batch

Postby sricsc » Fri Oct 08, 2010 11:06 am

Thanks for all. Its because of wrong stem variables usage. Problem has identified & solved with the help of trace. :P
Thanks,
Sri
sricsc
 
Posts: 13
Joined: Sat Aug 08, 2009 7:07 am
Has thanked: 0 time
Been thanked: 0 time

Re: REXX RC in Batch

Postby dick scherrer » Sat Oct 09, 2010 12:51 am

Good to hear it is working - thank you for letting us know :)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Next

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post