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




Is there an easy way to determine when a program was last run and
whether or not is it currently in use?

Type WRKOBJ OBJ(mylib/mypgm) OBJTYPE(*PGM)

Place an 8 next the program that you'd like to see. Page down, and there should be a "Last Used Date" on the screen.

I'd really like to be able to say "show me all programs that have not been accessed in 2005" or something to that effect.

When I do this, I usually have 3 or 4 libraries that I want to check at once. So I'll create a library list that contains only those libraries:

  CHGLIBL LIBL(LIB1 LIB2 LIB3) CURLIB(*CRTDFT)

Then, I'll dump a list of all programs in that library list, and their attributes, to a file:

  DSPOBJD OBJ(*USRLIBL/*ALL) +
          OBJTYPE(*PGM) +
          OUTPUT(*OUTFILE) +
          OUTFILE(QTEMP/PGMLIST)

Now every program object in LIB1, LIB2 or LIB3 is in the file called PGMLIST in QTEMP. I can run queries against that file to find out what has been used in 2005.

  SELECT odobnm,odudat
    FROM qtemp/pgmlist
    WHERE oducen='0' or odudat<'050101'

The ODUCEN field contains the century that it was used in. 0=19xx, 1=20xx.
The ODUDAT field contains the date in YYMMDD format.

So, if the century is 19xx, or if the date is before Jan 1, 2005, then it hasn't been used in 2005.

Make sense?

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.