Not really clear to me. Are you told to write EditMacro because there are several members in which this modification must be done. Otherwise a manual change would be ok.
Assuming the first, then there are more questions:
Why allways Step20, why allways the Dsn named TARGET,...and so on.
I think, you have to find out, which dataset is created, so which DD has the adequate DISP and SPACE parameters.
And you have to pay regard to some more occurrences.
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
You should at least test the macro manually. Then test through batch job (if that is how you want to run it). Edit macros are executed as a command while inside of the editor (or possibly, as the initial macro when getting into the editor).
It is not clear what you mean:
Quote:
After creating JCL, it will be executed on that JCL automatically.
About your program:
1. you need to start with Address ISREDIT 'MACRO'
2. your solution did not match the requirement! Rather than changing one space value for another, you are replacing the 4th line no matter what was there. After you find STEP10 and after you find TARGET, issue a change command:
Here I am finding STEP20 and TARGET dataset. From there, next to 3 lines, I am deleting a line which has the SPACE parameter and palcing new line with new SPACE parameter.
Let me explain how JCLs are created.
...We have a panel where we can enter business requirement/flow so that it will generate approprite JCLs from production JCLs for testing
...And we have macrolib(edit macros)
...After creation of JCL, it will search for a member in macrolib with the same name of JCL member.
...If it is found, that particular macro will be executed on that JCL member, if no macros found(no member is there in macrolib with same as JCL member), no macros are executed on that member.
...We will create macros with same name of JCL(member) and place it on macrolib so that it will be executed automatically.
Please let me know if any changes can be done to the macro.
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
Perhaps I am reading too much into your requirement. Your requirement is very specific.
your solution did not match the requirement! Rather than changing one space value for another, you are replacing the 4th line no matter what was there. After you find STEP10 and after you find TARGET, issue a change command:
What if the line reads: "(CYL,(50,10),"? your method will still change it, though that was not one of your stated requirements. What if SPACE is on a different line that you thought?
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
Hi,
I have noticed SPACE parameter after 2 lines from TARGET dataset. Thats why I coded to delete that line and to add another line with new SPACE parameter!!???
Instead of this, I used your suggestion on my code. It's good. I will get back to you if any issues.