Solved

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

Posted on 2009-04-09
5
1,382 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
5 Comments
 
LVL 34

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 34

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Windows 7 does not have the best desktop search built in. This is something Windows 7 users have struggled with. You type something in, and your search results don’t always match what you are looking for, or it doesn’t actually work at all. There ar…
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

947 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now