IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Passing RC from REXX to JCL


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 81
Location: Australia

PostPosted: Fri Apr 11, 2008 8:59 pm
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

Global Moderator


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

PostPosted: Fri Apr 11, 2008 9:16 pm
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: 81
Location: Australia

PostPosted: Fri Apr 11, 2008 9:56 pm
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

Global Moderator


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

PostPosted: Fri Apr 11, 2008 11:48 pm
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: 81
Location: Australia

PostPosted: Sat Apr 12, 2008 12:05 am
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: 81
Location: Australia

PostPosted: Sat Apr 12, 2008 10:03 am
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sat Apr 12, 2008 12:46 pm
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: 81
Location: Australia

PostPosted: Sat Apr 12, 2008 6:41 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top