|
|
| Author |
Message |
av_sukumar
New User
Joined: 12 Oct 2004 Posts: 6
|
|
|
|
Hi Everybody,
My doubt is I want to execute a rexx macro on group of members i.e
a dataset at one shot. Could some one please send me the suggesion
about how to do this..
Thanks in advance,
A.Sukumar |
|
| Back to top |
|
 |
References
|
|
 |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2040 Location: Israel
|
|
|
|
Here is my way to run a macro against each member of a PDS:
| Code: |
/*------------------------------- REXX -------------------------------
* PROGRAM : C@ALL
* FUNCTION : An example of how to run an edit-macro against all
* : members of PDS.
* AUTHOR : OFER
* DATE : 28/03/04
* HOW TO USE:
* :
*------------------------------------------------------------------*/
ARG PDS .
MAC = 'TEMPMAC' /* Macro name */
PDS = "'"STRIP(PDS,"B","'")"'"
X = OUTTRAP("LIBMEM.") /* Trap output of TSO */
ADDRESS TSO "LISTDS "PDS" M"
X = OUTTRAP("OFF")
PDS = STRIP(PDS,"B","'")
DO I = 7 TO LIBMEM.0
LIBMEM.I = STRIP(LIBMEM.I) /* Member name */
ADDRESS ISPEXEC "EDIT DATASET ('"PDS"("LIBMEM.I")') MACRO ("MAC")"
SAY I RC LIBMEM.I
END
EXIT
|
O. |
|
| Back to top |
|
 |
av_sukumar
New User
Joined: 12 Oct 2004 Posts: 6
|
|
|
|
Hi ,
Thanks for the reply . I tested the above macro but the problem is that whenever its executing the ADDRESS ISPEXEC "EDIT DATASET ('"PDS"("LIBMEM.I")') MACRO ("MAC")" line , Macro was opening the member in edit mode , if you press F3 then only its picking the second member. If we have 1 or 2 members this would be ok but it we want to execute on the 50 to 100 members this way is not ok ,Is in it??.
So what I want is , If we execute the macro it should perform that on all the member and come out.
please send me the reply asap.
Awaiting for reply,
A.Sukumar. |
|
| Back to top |
|
 |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2040 Location: Israel
|
|
|
|
Make sure that your macro have "ADDRESS ISREDIT 'END'" as the last edit command.
O. |
|
| Back to top |
|
 |
av_sukumar
New User
Joined: 12 Oct 2004 Posts: 6
|
|
|
|
Hi I checked with the above instruction which you had mentioned But still its giving the same problem. Check my macro below.
| Code: |
/*REXX*/
"ISREDIT MACRO"
ARG PDS .
MAC = 'DELL' /* MACRO NAME */
PDS = "'"STRIP(PDS,"B","'")"'"
X = OUTTRAP("LIBMEM.") /* TRAP OUTPUT OF TSO */
ADDRESS TSO "LISTDS "PDS" M"
X = OUTTRAP("OFF")
PDS = STRIP(PDS,"B","'")
DO I = 7 TO LIBMEM.0
LIBMEM.I = STRIP(LIBMEM.I) /* MEMBER NAME */
ADDRESS ISPEXEC "EDIT DATASET ('"PDS"("LIBMEM.I")') MACRO ("MAC")"
"ISREDIT END"
END
|
|
|
| Back to top |
|
 |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2040 Location: Israel
|
|
|
|
I really don't get what you do. I gave you a REXX exec, wich runs on a PDS, and invoke the macro TEMPMAC agains each member.
You turned my REXX exec into edit macro....
O. |
|
| Back to top |
|
 |
jz1b0c
Active User
Joined: 25 Jan 2004 Posts: 180 Location: Toronto, Canada
|
|
|
|
Guys,
Where do I need to write either TEMPMAC or DELL?
because I try to execute your code (both the above), I get an error message command TEMPMAC (or DELL) not found. |
|
| Back to top |
|
 |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2040 Location: Israel
|
|
|
|
Edit Macro written in REXX should be saved in your SYSEXEC library.
O. |
|
| Back to top |
|
 |
|
|