240 pts.
Q:
Need to find everyplace a file is being used.
I have a file that we are adding a field. Need to find every program the file is being used to know which ones need to be recompiler. Would be nice to do one big search of the entire library. 

Software/Hardware used:
as400
ASKED: Oct 22 2009  3:37 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
25660 pts.
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • Bookmark and Share
DSPPGMREF will get the F specs but...
Not SQL uses and I'm not sure about External Data structures.
For those you will have to Scan the Source code.

Phil

=================
Use the DSPPGMREF command specifying *ALL programs in a library to an outfile. Then run a query on the outfile with the following selection criteria and press Enter.

WHFNAM EQ 'Filename'

The output dislplays all the programs that are using the particular file.
Last Answered: Oct 22 2009  4:44 PM GMT by Philpl1jb   25660 pts.
Latest Contributors: Whatis23   5090 pts.
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

TomLiotta   15390 pts.  |   Oct 23 2009  12:53AM GMT

In general, if you build a list of programs, you can run DSPPGMREF against each program on the list to output file references into a file of references. You can then select those that name your file as was noted above.

However, you might also want to review any logical files that are built over the file you’re changing. Depending on how those LFs are defined and on how you add the field to the physical file, you might also need to recompile the LFs and recompile programs that use those LFs. Maybe.

You can probably ignore SQL references… unless you had some very inexperienced SQL developers. The SQL shouldn’t be affected.

How much detail do you need?

Tom

 

RonKoontz   1580 pts.  |   Oct 30 2009  1:26PM GMT

Fir a quickie just go to the library source you are looking at and do an option 25 then F11. Press enter and type the string you are looking for.

 

Reg   230 pts.  |   Nov 2 2009  3:02PM GMT

nbsp;<a href="http://systeminetwork.com/article/files-and-fields-%E2%80%93-where-are-they-used" title="http://systeminetwork.com/article/files-and-fields-%E2%80%93-where-are-they-used" target="_blank">http://systeminetwork.com/article/files-…</a> is where you can go to get a complete package to enable you to have this info at your fingertips at all times. Works great and is a stand alone package.

 

Teandy   4495 pts.  |   Nov 2 2009  7:35PM GMT

You may need to hit F13 (shift + F1) after entering 25 on the option field and before hitting enter.

 

Supriyob2   165 pts.  |   Jan 12 2010  11:08AM GMT

You can use DSPDBR or option 42 in AldonCMs