View previous topic :: View next topic
|
Author |
Message |
Csongor
New User
Joined: 23 Apr 2015 Posts: 16 Location: Hungary
|
|
|
|
Hello!
I am looking for a solution for inserting lines after a particular line in every member in a pds. To be more specific I would like to change the output, wich was 1 record, now it is going to be 3 records. It varies in wich line this output is located.
I have guess to make it work Isredit Line after command.
Sorry if this question has already been asked, I seached the forum, but I had 8000 matches on my keywords, so I rather ask it again.
Csongor |
|
Back to top |
|
|
Csongor
New User
Joined: 23 Apr 2015 Posts: 16 Location: Hungary
|
|
|
|
I made some progress, I think this was the hard part. Now I can add lines after a defined line.
I open with Rexx for edit:
Code: |
/*REXX*/
ADDRESS ISPEXEC
"EDIT DATASET ('SA81380.AJM.CMD.G0054V00') MACRO(EDITKE2)"
EXIT
|
And then i use the macro. The key is to define a label (.here), and after that the line_after can be used. I did not succeed to pass variables at first, but I did not try vput vget so far, it should work..
Code: |
/*REXX*/
B=2
ADDRESS ISREDIT "MACRO NOPROCESS"
ADDRESS ISREDIT "ISREDIT LABEL" B "= .HERE"
ADDRESS ISREDIT "ISREDIT LINE_AFTER .HERE = "DATA" "
B=B+1
ADDRESS ISREDIT "ISREDIT LABEL" B "= .HERE"
ADDRESS ISREDIT "ISREDIT LINE_AFTER .HERE = "DATA" "
ADDRESS ISREDIT "SAVE"
ADDRESS ISREDIT "END"
|
|
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
Read about system defined labels, like .ZCSR... |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
I just did something similar. Note that the line_after can take a line number as argument, which allowed me to do:
Code: |
n=some-line-number
l1 = 'first line inserted'
l2 = 'second line inserted'
l3 = 'third line inserted'
"line_after" n "= (l3)" /* insert in */
"line_after" n "= (l2)" /* reverse */
"line_after" n "= (l1)" /* order */
|
|
|
Back to top |
|
|
|