finding source files

5 pts.
Tags:
AS/400
iSeries development
WRKOBJPDM
I have been given the job of findind all source physical files on out AS400 In the pass there wre no standards for naming them. Have to locate all of these source physical file on our AS400 and them creat a spreensheet of all menbers trying to locate and drop the duplicate source code. Any help on how to fine ll of these source file would br helpful Thanks Craig

Answer Wiki

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

Hey Craig
The file “QADBXREF” contain all files present in your AS400. In that file, there is a field named “DBXTYP” who will contain the type of file D for data file or S for source file.

So…

Be shure that you have proper security priviledge to access the data of this file.

In SQL (STRSQL) …

SELECT * FROM QSYS/QADBXREF where DBXTYP = ‘S’

… and dump it into a work file.

Have Fun!

_________________________
DanTheMan

=============================================================

If at all possible, do not reference QADBXREF directly. This is a physical file that is used by DB2 itself and locks should be avoided.

IBM has provided numerous views into the database catalog. Use those instead. For source files, consider this alternative:<pre>
select * from systables where FILE_TYPE = ‘S’</pre>
It should provide the same rows, but DB2 has control interactions a little better. It might save you from needing a RCLSTG *DBXREF someday.

Tom

Discuss This Question: 2  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
  • Gilly400
    Hi, That's only going to list the source files in one library. You could try this :- DSPFD FILE(*ALLUSR/*ALL) TYPE(*MBRLIST) OUTPUT(*OUTFILE) FILEATR(*PF) OUTFILE(yourlib/yourfile) And then download your file into an excel sheet, select on source type = CLP or CLLE, etc. Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • WoodEngineer
    I just checked our system, running V5R3. QADBXREF contains many libraries. It should provide source file info from many libraries as well.
    6,345 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