Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search 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
Author Message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 32
Location: bangalore

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
References
PostPosted: Fri Apr 11, 2008 8:59 pm    Post subject: Re: Passing RC from REXX to JCL Reply with quote

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3001
Location: Charlotte,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: 32
Location: bangalore

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: 3001
Location: Charlotte,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: 32
Location: bangalore

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: 32
Location: bangalore

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: 2292
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: 32
Location: bangalore

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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1