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
 

 

To get the some return code from a macro

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
pradeepkit
Warnings : 1

New User


Joined: 25 Jun 2008
Posts: 60
Location: chennai

PostPosted: Mon Jan 05, 2009 9:29 pm    Post subject: To get the some return code from a macro
Reply with quote

Hi ,

I am making a tool in rexx .

It is invoking an ISPF macro to check jcl error (jj) . this macro is returning some return code i want to use this return code :

The code of macro :

"ISREDIT MACRO (PARMS)"

If RC<>0 then do
say "Macro not invoked as an Edit macro"
return rc
end

rc=D0JEJJCC("%D0JEJJ JJ" Parms)
say rc
return rc

and the rexx routine which is calling this macro :

/*REXX*/
INP1 = 'USER.TEST.PRADEEP.JCLLIB(JCLEX1)'
ADDRESS ISPEXEC
"VIEW DATASET('"INP1"') MACRO(JJC)"
IF RC > 4 THEN
SAY JCL ERROR
ELSE SAY OK
EXIT

I have two concerns :

1. I don't want to open that jclex1 code as i am using here view mode ,
if there is any way to invoke this macro without opening this member either in any of the mode .

2. I want to use the return code of the macro ,
but as this opens the member and i have to use PF3 to come out of it it gives RC = 0 as macro has successfully ran . but i want the return code which is returned inside .
Back to top
View user's profile Send private message

Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1224
Location: Israel

PostPosted: Mon Jan 05, 2009 9:42 pm    Post subject: Reply to: To get the some return code from a macro
Reply with quote

Quote:
rc=D0JEJJCC("%D0JEJJ JJ" Parms)
say rc
return rc

Between the say and the return, add the command:
Code:
'ISREDIT CANCEL'

This will close the VIEW without saving anything.
Your macro will then be executed without displaying the member.
Back to top
View user's profile Send private message
pradeepkit
Warnings : 1

New User


Joined: 25 Jun 2008
Posts: 60
Location: chennai

PostPosted: Mon Jan 05, 2009 9:48 pm    Post subject:
Reply with quote

Thanks for ur help the meber is not opened this time .........

For the second thing how to use the return code from Macro Any help .....
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2025
Location: Silicon Valley

PostPosted: Mon Jan 05, 2009 10:25 pm    Post subject: Reply to: To get the some return code from a macro
Reply with quote

I do not think you can pass a return code because VIEW is in between calling and called.

Try saving the return code in a variable and using VPUT to shared. Then use VGET later.
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 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 PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm


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