× 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.



Ron,

As I see it, you could do the following:

1 - DSPPGMREF PGM(*ALLUSR/*ALL) OUTPUT(*OUTFILE) OUTFILE(YOURLIB/PGMREF) 
2 - DSPFD FILE(*ALLUSR/*ALL) TYPE(*BASATR) OUTPUT(*OUTFILE) FILEATR(*PF
*LF) OUTFILE(YOURLIB/USRFILES)                                           
3 - Create and run a Query that compares USRFILES and PGMREF, Join Data
ATFILE = WHFNAM, Join Type = 3. Select ATDTAT = 'D' and generate a third
file with the output. You will get a file with ALL the files not being
used by your programs.
4 - Create a small CL program that read the file generated in (3) and
erases the files you want (using the ATFILE field).

!!!WARNING!!!!
As someone posted in reference to your question, this should be done
with the utmost caution. You don't want to process any "Q" (system)
files or libraries. And, of course, you should have a lot of backups
before doing any mass deletions!!!

Hope this helps.

Luis Rodriguez


> > On Tue, 24 Aug 2004 12:25:58 -0500, "Drew, Ronald"
> > <RDrew@xxxxxxxxxxxxxxx> said:
> > > Does anyone out there know of any utility available that can look at an
> > > AS400 program directory, scan the RPG code and return results of only the
> > > programs that have specific criteria back?  We have 5,200 RPG programs
> > > and I
> > > bet at least 4,000 are just reports.  We have 4900 files of which I
> > > believe
> > > at least 3500 are no longer used.  The environment has been built over
> > > many
> > > years and nothing has been purged.  I now want to upgrade to a non-green
> > > screen environment but want to purge the out stuff not being used.  So I
> > > want to scan the code and look for the programs that only match criteria
> > > such as a printer for output.  Do you know of any utility or can you
> > > point
> > > me in the right direction?
> > > 
> > >  
> > > 
> > > I have asked IBM and a friendly rep advised using DSPPGMREF (Display
> > > Program
> > > References) creating an output file and then downloading it to the PC for
> > > investigating.
> > > 
> > > Does anyone have any other ideas?
> > > 
> > >  
> > > 
> > > Ron Drew
----------------
  Luis Rodriguez


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.