View previous topic :: View next topic
|
Author |
Message |
sakrat
Active User
Joined: 05 Feb 2014 Posts: 164 Location: India
|
|
|
|
Hi,
How to insert blank lines using rexx ISREDIT....I want to insert some n number of blank lines before a line containing values...so i tried to find the cursor position of that line and tried inserting a blank line using LINE_BEFORE instruction but still i am not able to achieve what i need...here is my code below :
/*REXX*/
"ISREDIT MACRO"
TRACE (R)
TEMP="NEW,CATLG,DELETE"
I=1
"ISREDIT SEEK ALL '"TEMP"'"
"ISREDIT (COUNT) = SEEK_COUNTS"
COUNT1=COUNT
DO WHILE COUNT > 0
IF RC=0 THEN DO
"ISREDIT (VAL) = LINENUM .ZCSR"
VAL1=VAL-1
"ISREDIT (LINE) = LINE " VAL1
INPUT.I = STRIP(LINE)
PARSE VALUE "'"INPUT.I"'" WITH PREC ','
OUT=POS('=',PREC)
RES=SUBSTR(PREC,OUT+1)
OUTPUT.I=RES
"ISREDIT FIND NEXT '"TEMP"'"
COUNT=COUNT-1
I=I+1
END
END
TEMP1=EXEC
"ISREDIT FIND FIRST '"TEMP1"'"
RES1=COUNT1+3
DO J=0 TO RES1 BY 1
"ISREDIT LINE_BEFORE .ZCSR = ' ' "
END
INS=" SET MAXCC=0"
"ISREDIT LINE_BEFORE .ZCSR = '"INS"' "
"ISREDIT (LINE1) = LINENUM .ZCSR"
LINE2=LINE1-1
"ISREDIT CURSOR = "LINE2" 1"
I=STRIP(COUNT1,'L','0')
DO WHILE COUNT1 > 0
OUT=' ' || DELETE ||' ' || OUTPUT.I
"ISREDIT LINE_BEFORE .ZCSR = '"OUT"' "
COUNT1=COUNT1-1
I=I-1
END
"ISREDIT END"
In the above code i am finding the first EXEC and i want to leave 5 lines before that EXEC line as that 5 lines will have description of that step...How do i move my cursor backward from the EXEC line to the top of the description line....??? so that before that line i will insert "/* " and before that SET MAXCC=0 using LINE_BEFORE instruction....and i will insert the delete steps using same line_before (using OUT variable i wrote a code for that)... also i want to add the 3 more lines like the IDCAMS step before the delete step how to write those three steps....can i use QUEUE here for writing a 3 lines together...If so how to write command for that i have tried QUEUE with DISKW but i dont know how to use that in ISREDIT MACRO....some one please help me with these two problem which i am facing...please give me the syntax help or atleast some idea of how can i achieve writing this... |
|
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
|
|
|
|
Quote: |
can i use QUEUE here for writing a 3 lines together...If so how to write command for that i have tried QUEUE with DISKW but i dont know how to use that in ISREDIT MACRO.... |
You should not use EXECIO ... DISKW (implied by the use of QUEUE) at the same time that you are editing a PDS member.
Quote: |
still i am not able to achieve what i need |
That is a pretty vague problem description.
Quote: |
How do i move my cursor backward from the EXEC line to the top of the description line....??? |
It would help if you provided an example of the original data, including the description line. Also, please provide an example of the desired result. You verbally describe it, but an example would be much clearer. Lacking an example, my first suggestion is to use "FIND 'abc' PREV". |
|
Back to top |
|
|
|