× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re(2): Bulk update of CL source file
  • From: "Mike Naughton" <mnaughton@xxxxxxxxxxxx>
  • Date: Tue, 03 Apr 2001 15:59:04 -0500

I agree this wouldn't be too hard to write. It would be my choice,
depending on a) how many members I had to update, and b) my confidence
level that _all_ instances of the given string should be changed.  One
wrinkle might be that if you're looking to replace a string with a
variable, you might also want to 1) add a DCL statement to define that
variable, and 2) add that variable as a parm to be passed in  (?).

Anyway, my method would be to:
1) create an outfile using DSPFD(*MBRLIST) of the cl members I want to
search
2) write a cl program to
    a) read through this outfile
    b) override some generic member name to the specific member read
    c) call an rpg program (if possible, I'd call an ILE program and use
this an opportunity to learn more about ILE's superior string-handling
techniques) written to use the generic member name. This program would
first read through the source looking for the string to replace. If not
found, it would just write the orignal out to a new source file; if found,
it would write a new member putting in whatever changes are needed. It
could also write a log file of which members were changed and which were
not.
    d) delete the override and go back to a)
3) the log file could then be used to compile the cl members that  had
been changed.

hth

MIDRANGE-L@midrange.com writes:
>I imagine one could write a program to input all members of the QCLSRC
>file, 
>one at a time, then replace the lines involved.  You might want to COPY
>the 
>old line, comment out the old line, insert replacement & also have a
>comment 
>line flagging what is going on for future audit trail.
>
>There are utilities to manage this kind of thing & I am sure folks on
>this 
>list will identify them.
>
>MacWheel99@aol.com (Alister Wm Macintyre) (Al Mac)


Mike Naughton
Senior Programmer/Analyst
Judd Wire, Inc.
124 Turnpike Road
Turners Falls, MA  01376
413-863-4357 x444
mnaughton@juddwire.com

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.