Discussion:
Finding Out Where Files Are Used In RPG pgms.
(too old to reply)
John Wood
2003-11-05 12:41:52 UTC
Permalink
Hi.

Is there an OS/400 command to show which RPG program use a specified
physical / logical file?

I've just cocked our system up because I made a change to a physical file
and had no idea that a certain sweet of programs used the file.

Cheers,

John.
Dr. Ugo Gagliardelli
2003-11-05 13:23:42 UTC
Permalink
Post by John Wood
Hi.
Is there an OS/400 command to show which RPG program use a specified
physical / logical file?
I've just cocked our system up because I made a change to a physical file
and had no idea that a certain sweet of programs used the file.
DSPPGMREF is a command that lists objects referenced in a program, files too.
--
Dr.Ugo Gagliardelli,Modena,ItalyCertifiedUindoscrasherAñejoAlcoolInside
Spaccamaroni andate a cagare/Spammers not welcome/Spammers vão à merda
Spamers iros a la mierda/Spamers allez vous faire foutre
Spammers loop schijten/Spammers macht Euch vom Acker
J Connor
2003-11-06 01:18:53 UTC
Permalink
There are great third party programs out there, the one we use uses
the command DSPXREF.
George Kinney
2003-11-06 00:00:42 UTC
Permalink
Post by John Wood
Hi.
Is there an OS/400 command to show which RPG program use a specified
physical / logical file?
I've just cocked our system up because I made a change to a physical file
and had no idea that a certain sweet of programs used the file.
Yes and no.

If you bought *all* of ADTS, you would have gotten the ADM (Application
Dictionary Manager)
which would answer such questions directly. It keeps an up-to-date
cross-reference database
of libraries/objects you tell it to monitor. But since it isn't included by
default, its probably not
installed. (WRKAPPDCT starts it if it is)

There is also a free tool floating around out there called DSPOBJREF which
you'll have to google for,
and it requires some tweaking to run, but it does essentially the same job.
walter
2003-11-06 07:06:10 UTC
Permalink
Post by John Wood
Is there an OS/400 command to show which RPG program use a specified
physical / logical file?
If you have the program sources:
strpdm - 2 - Lib. Q* as object filter makes it shorter.
Then 25 in front of QRPGSRC (or where your sources are).
Enter the file name as search string and you get 2 spoolfiles, one
with a pgm list, one with more details.

Without source file: DSPPGMREF

Walter
2003-11-06 12:05:57 UTC
Permalink
Post by John Wood
Hi.
Is there an OS/400 command to show which RPG program use a specified
physical / logical file?
I've just cocked our system up because I made a change to a physical file
and had no idea that a certain sweet of programs used the file.
Cheers,
John.
The above answers are OK so far as they expect the RPG to have the correct
filename. I expect you would find all of the programs you are looking for
99% of the time but just when you least expect it there will be a slightly
different named file which gets used when an OVRDBF is applied in some
place, so be careful.
--
Jonathan.
Terrence Enger
2003-11-06 15:51:27 UTC
Permalink
Post by
Post by John Wood
Hi.
Is there an OS/400 command to show which RPG program use a specified
physical / logical file?
I've just cocked our system up because I made a change to a
physical file
Post by
Post by John Wood
and had no idea that a certain sweet of programs used the file.
Cheers,
John.
The above answers are OK so far as they expect the RPG to have the correct
filename. I expect you would find all of the programs you are looking for
99% of the time but just when you least expect it there will be a slightly
different named file which gets used when an OVRDBF is applied in some
place, so be careful.
There are commercial tools to make this job easier. I used
DocuMint for a while, and I grew to like it and rely on it.

Of course, each of us over the years has hacked his own
tools for the purpose from time to time. Starting from
output of DSPPGMREF across all application libraries, I have
found it useful to look at all references with the
particular file level identifier. Of course, LVLCHK(*NO)
can still let you miss references to your file.

I know no truly foolproof way to accomplish your purpose.
Alan Turing tells me not to spend much effort looking for a
perfect solution.

HTH.

Terry.
Available for contract programming.
Chris Schmidlin
2003-11-06 18:17:06 UTC
Permalink
With a Software Change Management Tool, this iissue is handled
automatically, including other (of course related) systems.

Example: WWW.ALDON.COM

They are based in the US but with a very strong team in the UK.
They will be glad to give you a demo by webex.
Please mention my name if you contact them.

Regards

Chris
Post by John Wood
Hi.
Is there an OS/400 command to show which RPG program use a specified
physical / logical file?
I've just cocked our system up because I made a change to a physical file
and had no idea that a certain sweet of programs used the file.
Cheers,
John.
--

Chris Schmidlin
DJ-Romandie

Remove _nospam_
post400
2003-11-07 12:28:21 UTC
Permalink
Post by John Wood
Hi.
Is there an OS/400 command to show which RPG program use a specified
physical / logical file?
I've just cocked our system up because I made a change to a physical file
and had no idea that a certain sweet of programs used the file.
Cheers,
John.
Hi,

you should try the two analyze commands ANZDBF and ANZPGM . You'll get
a wealth of information about files and their usage.

Bye,
post400

Loading...