Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to insert Blank lines in ISREDIT macro using rexx...???

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
sakrat

Active User


Joined: 05 Feb 2014
Posts: 159
Location: India

PostPosted: Mon Feb 10, 2014 10:10 pm    Post subject: How to insert Blank lines in ISREDIT macro using rexx...???
Reply with quote

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
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Mon Feb 10, 2014 10:23 pm    Post subject: Reply to: How to insert Blank lines in ISREDIT macro using r
Reply with quote

search the forum with LINE_BEFORE and You will find a few snippets
( know because I posted them )

To save some of Your precious time here are a couple of links ( LINE_BEFORE)

http://www.ibmmainframes.com/viewtopic.php?t=55037&highlight=linebefore
http://www.ibmmainframes.com/viewtopic.php?t=40237&highlight=linebefore

up to You to search for the examples with LINE_AFTER

but remember ... things might get tricky because of the changes in the line numbers
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2033
Location: Silicon Valley

PostPosted: Mon Feb 10, 2014 11:44 pm    Post subject: Reply to: How to insert Blank lines in ISREDIT macro using r
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts REXX compiled via RXTCOMP sergeyken CLIST & REXX 7 Tue Feb 07, 2017 9:41 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us