View previous topic :: View next topic
|
Author |
Message |
t_ctaram
New User
Joined: 15 May 2007 Posts: 20 Location: mumbai
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
t_ctaram
New User
Joined: 15 May 2007 Posts: 20 Location: mumbai
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I would think that a TRACE on both the caller exec and the macro exec would help pinpoint any potential issues. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
t_ctaram
New User
Joined: 15 May 2007 Posts: 20 Location: mumbai
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
In your macro you need ADDRESS ISREDIT END/CANCEL.
O. |
|
Back to top |
|
|
|