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

How to call a ISREDIT macro from a rexx exec


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

New User


Joined: 15 May 2007
Posts: 20
Location: mumbai

PostPosted: Tue Jul 03, 2007 5:39 pm
Reply with quote

I have a requirement where i want to call a Macro from a Rexx Exec.

eg.
i have a rexx exec ABC and another rexx exec XYZ( ISREDIT macro)
i want to call the rexx exec XYZ from the exec ABC.

CTARAM.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Tue Jul 03, 2007 5:46 pm
Reply with quote

You'd have to invoke EDIT for the intended dataset, passing the macro name (XYZ) to EDIT.

You can see an example here in this previous topic.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Jul 03, 2007 7:12 pm
Reply with quote

Edit macros can be invoked only from within an Edit/View session.

You can enter an Edit/View session either using your ISPF menu, or by ISPF Services (like EDIT or VIEW).

O.
Back to top
View user's profile Send private message
t_ctaram

New User


Joined: 15 May 2007
Posts: 20
Location: mumbai

PostPosted: Tue Jul 03, 2007 7:55 pm
Reply with quote

iam using
address ispexec "edit dataset("ds") macro(XYZ)"

but its is not going to XYZ.

how can i trace whether its executing the macro XYZ or not.

The macro XYZ is in the same PDS in which i have my main Exec.

the environment of main exec is TSO. Is there might be any reason that it will not invoke the exec XYZ
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jul 03, 2007 10:00 pm
Reply with quote

May be nothing but try this version

ADDRESS ISPEXEC "EDIT DATASET('"ds"') MACRO(XYZ)"

Which encloses the dataset name within single quotes.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Tue Jul 03, 2007 10:03 pm
Reply with quote

I would think that a TRACE on both the caller exec and the macro exec would help pinpoint any potential issues.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Jul 04, 2007 10:55 am
Reply with quote

1. Are you running in batch or foreground?
2. What is the RC of the EDIT service?
3. Try to display ZERRSM/ZERRLM after the edit.
4. Use Dialog Trace (option 7 in my ISPF menu).

O.
Back to top
View user's profile Send private message
t_ctaram

New User


Joined: 15 May 2007
Posts: 20
Location: mumbai

PostPosted: Wed Jul 04, 2007 12:21 pm
Reply with quote

hi all,

Thanks for your valuable suggessions.

the code suggested by you is working.

But it goes into the Macro XYZ and never returns back to the main Exec ABC.

DO i need to use RETURN or some thing else to getback to ABC and continue with other members of my PDS.

Thanks in advance
CTARAM
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Jul 04, 2007 4:08 pm
Reply with quote

In your macro you need ADDRESS ISREDIT END/CANCEL.

O.
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 Compile Several JCL JOB Through one r... CLIST & REXX 4
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
Search our Forums:

Back to Top