Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 4650
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: 4650
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

Moderator


Joined: 14 Mar 2007
Posts: 10475
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 Trap the jcl error message or maxcc i... ankita agarwal CLIST & REXX 5 Fri May 18, 2018 2:08 pm
No new posts Getting an error from EZASOKET while ... vaibhav gs COBOL Programming 4 Thu May 17, 2018 9:21 pm
No new posts Rexx command to open an another text ... Bharath Vikraman PC Guides & IT News 7 Sat May 12, 2018 4:34 pm
This topic is locked: you cannot edit posts or make replies. GDG gen check using REXX raghuraman123 CLIST & REXX 6 Wed Apr 18, 2018 9:18 pm
No new posts How to control Panel Attributes throu... rsshanmugam CLIST & REXX 3 Mon Feb 26, 2018 9:51 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us