|
View previous topic :: View next topic
|
| Author |
Message |
ayansau
New User

Joined: 22 Jun 2007 Posts: 42 Location: Chennai
|
|
|
|
Hi,
I have the following code:
| Code: |
/*******************************REXX******************************/
DSIN = 'XXXX00D.ISDXU03.INPUT.JCLLIB(MYJCL)'
ADDRESS ISPEXEC
"EDIT DATASET('"DSIN"') MACRO(JJ)"
IF RC > 4 THEN
SAY 'JCL ERROR'
ELSE
SAY 'OK'
"ISREDIT CANCEL"
EXIT |
I want to save the expanded version output in some other dataset. How can I do it? |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8798 Location: Welsh Wales
|
|
|
|
Where is the expanded JCL created.
How is it created.
When is it created. |
|
| Back to top |
|
 |
ayansau
New User

Joined: 22 Jun 2007 Posts: 42 Location: Chennai
|
|
|
|
The expanded jcl created in the same location
'XXXX00D.ISDXU03.INPUT.JCLLIB(MYJCL)' but if I CUT and PASTE the expanded JCL, expanded lines are not copied.
If I execute the REXX code by giving EX, it's expanding. |
|
| Back to top |
|
 |
prino
Senior Member

Joined: 07 Feb 2009 Posts: 1325 Location: Vilnius, Lithuania
|
|
|
|
| Use VIEW rather than edit and put an MD9999 line command on the first line before doing the CUT and then cancel out. |
|
| Back to top |
|
 |
ayansau
New User

Joined: 22 Jun 2007 Posts: 42 Location: Chennai
|
|
|
|
| Is there any possibility to use the same commend (MD9999) in the rexx code and save the output? |
|
| Back to top |
|
 |
prino
Senior Member

Joined: 07 Feb 2009 Posts: 1325 Location: Vilnius, Lithuania
|
|
|
|
| ayansau wrote: |
| Is there any possibility to use the same commend (MD9999) in the rexx code and save the output? |
No!
There are no publicly-documented methods to work with non-data lines in the ISPF editor, other than the L(ocate) command. |
|
| Back to top |
|
 |
Marso
REXX Moderator

Joined: 13 Mar 2006 Posts: 1356 Location: Israel
|
|
|
|
| Quote: |
| if I CUT and PASTE the expanded JCL, expanded lines are not copied. |
If this is so, maybe the expanded lines are in fact message lines (==MSG>), note lines (=NOTE=) or info lines (======), not real member lines.
I'm not sure there is way to use MD in a macro, so maybe it is no possible to save.
| Quote: |
| I want to save the expanded version output in some other dataset. |
I assume that the macro JJ leaves the member opened, so you will have to change some of your logic:
Write your own macro MYJJ:
| Code: |
"ISREDIT JJ"
"ISREDIT CREATE newdsn(newmem) .ZF .ZL"
"ISREDIT CANCEL" |
Execute your own macro instead of "JJ":
| Code: |
| "EDIT DATASET('"DSIN"') MACRO(MYJJ)" |
|
|
| Back to top |
|
 |
|
|