You can try this.  No guarantee: 

   /* REXX */                                 
   address isredit                            
   'macro (sstring)'                          
   '(mylrecl) = LRECL'                        
   istring = copies('=',mylrecl)              
   "find '"||sstring||"' last"                
   "(Fcnt) = FIND_COUNTS"                     
   Do while fcnt > 0                          
      "(fpos) = CURSOR"                       
      do i = 1 to 3;                          
         "LINE_BEFORE" fpos "= (istring)"     
      end                                     
      fpos = fpos - 1                         
      if fpos < 1 Then leave                  
      "CURSOR = " fpos                        
      "find '"||sstring||"' PREV"             
      "(Fcnt) = FIND_COUNTS"                  
   End                                        
   exit                                       

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Steely.Mark
Sent: Monday, April 14, 2025 12:54 PM
To: [email protected]
Subject: ISREDIT Macro odd request

I'm looking for an ISREDIT macro that will search for a specific string within 
a member.
Whenever the string is found, the macro should insert three lines containing 
only a series of =============== immediately before the matched line.
The macro should continue searching through the entire member, repeating this 
action for every occurrence of the string.

If anyone has a similar EDIT macro that they could share or modify to meet this 
need, I'd greatly appreciate it.

Thank You


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to