Solved

Find all programs that use a certain file on an ISeries AS/400

Posted on 2009-04-09
5
1,630 Views
Last Modified: 2013-12-06
I have a problem with a certain file and need to reference all programs that use this file.  Is there a command or cross reference I can run to locates these programs?
0
Comment
Question by:Aidenous
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 35

Accepted Solution

by:
Gary Patterson earned 250 total points
ID: 24108301
The DSPPGMREF command allows you to dump a list of objects referenced by a particular program (or group of programs) to the screen, to a spooled file, or to a database file.  this can be a VERY long running command if you run it over a large set of objects.  I suggest submitting a series of commands, perhaps library by library, rather than doing something like *ALLUSR.  submit the command to batch.

http://publib.boulder.ibm.com/html/as400/v5r1/ic2994/index.htm?info/cl/dsppgmre.htm

If the file has logicals, indexes, or views created over it, remember that you probably need to search the DSPPGMREF output for all of those, too.

Another great tools it to turn on journaling for that database file (or inspect the journal receiver if journaling is already in use).  Journal receivers log the date, time, program, user, job, and details of every change to every record of a journaled file.  Be aware that journal receivers can grow very large on frequently-maintianed files.  the Bacup and Recover manual (or section of the Information Center) can provide more informationon journaling.    

- Gary Patterson
0
 
LVL 27

Assisted Solution

by:tliotta
tliotta earned 250 total points
ID: 24112243
Aidenous:

Be aware that Gary's reference to journaling might be your only way to locate all references.

File references can be 'symbolic' through the use of variables that hold the actual file names or 'indirect' through the use of logical views or aliases. Overrides (e.g., OVRDBF) can redirect to a file.

And SQL can really interfere.

But a journal will still be notified when the file is accessed, regardless of symbols, indirection, SQL, whatever.

Also, there is database journaling and there is object (audit) journaling. The system audit journal can log object read and object change actions. That is separate from any database journaling, and it logs very different information. The database journal is more focused on the data spaces and what happens to the data. The audit journal is more focused on the object itself rather than its content.

The appropriate methods for locating references to files can depend on the methods used by the developers of the programs. Just be aware that you might need to do some detective work if you need to find everything. Some references can be fairly well obscured.

Gary's got you started with the most likely tool -- DSPPGMREF. If you run into questions, keep asking for more info.

Tom
0
 
LVL 35

Expert Comment

by:Gary Patterson
ID: 24112361
Tom,

I'm glad you brought that up.  As database files are more and more frequently accessed from non-native programs, DSPPGMREF loses more and more of it's value.

Aidenous,

If all you are concerned about are direct references in traditional CL, RPG, and COBOL programs, the DSPPGMREF is very good.

Personally, if I need to track down what program is causing a data problem, I almost always use database journaling, unless it is a file that is only modified in a very few places.   It is fantastic for intermittent problems, or problems caused by client-server applications.  Database journaling catches every single change to the journaled file, even changes to files through system utilities or APIs like interactive SQL, DFU, remote DDM, DRDA, ODBC, etc.
 
- Gary Patterson
0
 
LVL 1

Expert Comment

by:mayankgangrade
ID: 24221727
Hi,

Hawkeye PATHFINDER is the most advanced and comprehensive documentation, cross reference, and impact analysis software available for the IBM AS/400.
The package will analyze files, programs, and fields, along with other system or user objects, and place that information on a workstation, printer or in an outfile within seconds. Beyond cross reference, PATHFINDER also contains numerous utilities for managers, operators, programmers, and security officers.

PATHFINDER is designed to allow you to accomplish your development tasks without ever leaving the package.
0
 

Expert Comment

by:larry_dili
ID: 24337300
Use Hawkeye is you have. Or DSPPGMREF.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
Sometimes a user will call me frantically, explaining that something has gone wrong and they have tried everything (read - they have messed it up more and now need someone to clean up) and it still does no good, can I help them?!  Usually the standa…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question