Need to find everyplace a file is being used.

385 pts.
Tags:
DDS
RPG
RPGLE
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.

Discuss This Question: 9  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    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
    125,585 pointsBadges:
    report
  • RonKoontz
    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.
    1,780 pointsBadges:
    report
  • reg
    http://systeminetwork.com/article/files-and-fields-%E2%80%93-where-are-they-used 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.
    280 pointsBadges:
    report
  • Teandy
    You may need to hit F13 (shift + F1) after entering 25 on the option field and before hitting enter.
    5,860 pointsBadges:
    report
  • Supriyob2
    You can use DSPDBR or option 42 in AldonCMs
    165 pointsBadges:
    report
  • WoodEngineer
    The URL below may not work.  Try this one for a nice utility which should do what you need.



    6,715 pointsBadges:
    report
  • azohawk

    Do all of the programs need to access the new field?  If not, don't recompile the file, use the CHGPF (option 2 on the object in PDM) command to add the new field, then on the logicals. This way the file maintains it file level id (no level check errors) and you only need to recompile the programs that need to access the new file.

    545 pointsBadges:
    report
  • kitvb1
    The free version of XrefIT (v1.23) will do it for you. It includes Query, DSPF, PRTF, LF, programs, etc.
    40 pointsBadges:
    report
  • WoodEngineer
    My apologies.  That link did not work.  I just confirmed that the URL below works.  I am pasting it without making it a link.  Maybe that will work better.  Just copy and paste the URL into your browser.

    http://iprodeveloper.com/systems-management/files-and-fields-where-are-they-used




    6,715 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following