• Subject: Re: Re(2): Bulk update of CL source file
  • From: Scott Klement <klemscot@xxxxxxxxxxxx>
  • Date: Wed, 4 Apr 2001 10:40:46 -0500 (CDT)

Does ILE actually have improved string handling over OPM?  Or are you
just referring to the difference between RPG III and RPG IV?  

Hmmmm...   why would you write a seperate CL and RPG?  Why not just do
the whole thing in a single RPG program with a UsrOpn file?  (To come
to think of it, I really don't write CL programs anymore these days)

You could also use the QUSLMBR API to get the list of members.  It'd be
a bit faster than DSPFD.   Though, I don't know how noticable the
difference would be. :)

Just wondering why you picked this approach?

On Tue, 3 Apr 2001, Mike Naughton wrote:

> 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

| 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

This thread ...


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

This mailing list archive is Copyright 1997-2019 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].