View previous topic :: View next topic
|
Author |
Message |
southee
New User
Joined: 17 Jun 2012 Posts: 20 Location: INDIA
|
|
|
|
Hi,
I'm trying to execute edit macro on all members in a PDS
BELOW IS THEREXX CODE IN CSTEP2
Code: |
/* REXX */
PULL INPUT
X=OUTTRAP('ML.')
"LISTDS "INPUT" MEMBERS"
X=OUTTRAP('OFF')
DO N=7 TO ML.0
PARSE VAR ML.N MEMBER
MEMBER=STRIP(MEMBER)
ADDRESS TSO
CPSR = ''INPUT'('MEMBER')'
"ALLOC DDN(SRM) DSN('"CPSR"') SHR"
RC1 = RC
ADDRESS ISPEXEC
"EDIT DATASET('"CPSR"') MACRO(CMAC)"
ADDRESS TSO
"FREE FI(SRM)"
END
|
tHE CMAC is as below
Code: |
/* REXX */
ADDRESS ISPEXEC
"ISREDIT MACRO"
"ISREDIT "C ALL ',NOTIFY=&SYSUID' ''" "
"ISREDIT "C ALL 'NOTIFY=&SYSUID,' ''" "
"ISREDIT "C ALL 'DT1G,' 'DP1G'" "
"ISREDIT "C ALL 'REGION=99M,' 'REGION=99M'" "
ADDRESS ISREDIT "END"
|
The macro is running perfectly on a single member but i have to press PF3 key to make it execute on rest of members.
Suppose if i have 200 members and if i need to execute this macro on that i need to press PF3 key 200 times .
Is there a way to escape pressing PF3 key ?
Coded - Anuj |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
Back to top |
|
|
southee
New User
Joined: 17 Jun 2012 Posts: 20 Location: INDIA
|
|
|
|
Anuj Dhawan wrote: |
Please learn to use BBcode Tags, I 've edited your post to add them. For your query, have a look at this earlier thread:
ibmmainframes.com/about9012.html |
Hi Anuj,
The earlier post says to use "ADDRESS ISREDIT 'END'" at the end of macro.
I used the same one with no luck. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Show us the trace.
What is on the screen when you have to press PF3?
Perhaps add a SAVE also. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Not the source of your problem, but...
1. You do not need ALLOCATE and FREE commands... they are not used for
anything and they are sort of expensive.
2. I question the use of single quotes as dataset name delimiters. Not used in LISTDS command; Are used in Allocate command; Are used in EDIT statement; not sure in CPSR assignment. I am not sure it will work correctly when PROFILE PREFIX is used.
3. you should probably check the third line of the LISTDS response to make sure that DSORG=PO. |
|
Back to top |
|
|
|