Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Passing RC from REXX to JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 80
Location: Australia

PostPosted: Fri Apr 11, 2008 8:59 pm    Post subject: Passing RC from REXX to JCL
Reply with quote

Hi,

I am executing a rexx module through JCL using IKJEFT01. even when there is a error RC in REXX module, JCL still gives MAXCC=0. i need to manually check SDSF for errors. Can someone help me in passing this RC to JCL. I am using EXIT RC while trapping errors.

Can someone please advise ??

Thanks,
Charan
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri Apr 11, 2008 9:16 pm    Post subject: Reply to: Passing RC from REXX to JCL
Reply with quote

It doesn't work that way for me. If I code "EXIT 4" I get a return-code of 4 for that step, and so on for other exit codes.

Can you post a run-time TRACE of the relevant section of your REXX exec?
Back to top
View user's profile Send private message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 80
Location: Australia

PostPosted: Fri Apr 11, 2008 9:56 pm    Post subject:
Reply with quote

79 *-* IF SMEMF /= 'OK'
>V> "MEMBER NOT FOUND"
>L> "OK"
>O> "1"
*-* THEN
80 *-* DO
81 *-* SAY SFILE SMEMF
>V> "CMTT.ABCD.UCC7LIB.TEST(B2DA200)"
>V> "MEMBER NOT FOUND"
>O> "CMTT.ABCD.UCC7LIB.TEST(B2DA200) MEMBER NOT FOUND"
CMTT.ABCD.UCC7LIB.TEST(B2DA200) MEMBER NOT FOUND
82 *-* EXIT 12
>L> "12"
A command entered or contained in a CLIST has invalid syntax.
ISPD117
The initially invoked CLIST ended with a return code = 12

I am still getting JCL giving MAXCC=0

STEP | COMP | TCB | SERVICE | EXCP | COST
NB NAME | CODE | TIME | UNITS | COUNT |
----------------------------------------------------------------------------
1 STEP010 | R0000 | 00:00:00.03 | 98 | 2 | $ 0.00
2 STEP020 | R0000 | 00:00:00.15 | 3,138 | 207 | $ 0.02
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri Apr 11, 2008 11:48 pm    Post subject: Reply to: Passing RC from REXX to JCL
Reply with quote

Quote:
A command entered or contained in a CLIST has invalid syntax.


You might want to do something about this error first.
Back to top
View user's profile Send private message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 80
Location: Australia

PostPosted: Sat Apr 12, 2008 12:05 am    Post subject:
Reply with quote

I really am not able to identify the error. can you please help ??
Back to top
View user's profile Send private message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 80
Location: Australia

PostPosted: Sat Apr 12, 2008 10:03 am    Post subject:
Reply with quote

look at this

[img] 28 *-* /********************************************************************
29 *-* IF MYVAR.0 /= 1
>V> "2"
>L> "1"
>O> "1"
*-* THEN
30 *-* DO
31 *-* SAY "MULTIPLE SOURCE REGIONS OR IT'S MISSING"
>L> "MULTIPLE SOURCE REGIONS OR IT'S MISSING"
MULTIPLE SOURCE REGIONS OR IT'S MISSING
32 *-* EXIT 12
>L> "12"
ISPD117
The initially invoked CLIST ended with a return code = 12 [/img]

even here, i am getting JCL MAXCC=0. why is this rc of 12 from rexx not passed to JCL ?? Can someone advise.?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Sat Apr 12, 2008 12:46 pm    Post subject: Reply to: Passing RC from REXX to JCL
Reply with quote

a plain rexx will pass the return code back to jcl

a rexx invoked with ISPSTART CMD(Your_rexx) will pass the return code back to ISPF

what about a...
Code:
ZISPFRC = Your_return_code
Address ISPEXEC "VPUT (ZISPFRC)"
Back to top
View user's profile Send private message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 80
Location: Australia

PostPosted: Sat Apr 12, 2008 6:41 pm    Post subject:
Reply with quote

Great !! Thanks Enrico. I had tried only the first line code given by you. i didn't know that i had to put a VPUT along with it. It's working fine.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts REXX compiled via RXTCOMP sergeyken CLIST & REXX 7 Tue Feb 07, 2017 9:41 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us