Finding source physical files

330 pts.
Tags:
AS/400
RPG
Can you help this iSeries user? He wants to know how he can find only source physical files in any library (Ex: QDDSSRC, QCLSRC, etc.). Thanks! Michelle Davidson Editor Search400.com
ASKED: August 16, 2005  10:20 AM
UPDATED: January 20, 2011  5:28 AM

Answer Wiki

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

USE COMMAND : STRPDM
I would use PDM option 2. Work with objects:

Enter the library name to search for source physical files.

Under OBJECT name key: *ALL
Under TYPE key: *FILE
Under ATTRIBUTE key: PF-SRC

Also can be done by
WRKLIBPDM with library name

PGMBOB: I would build a file of the physical files and select the source attribute. Try DSPOBJD *all/*all OBJTYPE(*file) output(*OUTFILE)

Provide an OUTFILE library/filename. A file will be written with a format supplied by the system. Use SQL select the *File objects and attribute.
Good luck

Discuss This Question: 8  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
  • Cyates
    The PDM option is best if you want to find a source member so you can change it. If you just want a list of where the files are you can do the following: DSPFD FILE(library to check/*ALL) TYPE(*BASATR) OUTPUT(*OUTFILE) OUTFILE(library/file to hold output) If the field ATFILA = *PHY and field ATDTAT = S it is a source physical file. You can use the outfile created from the command in a query, RPG, or CL program.
    0 pointsBadges:
    report
  • WaltZ400
    In QSYS library there is a file named QADBXREF that contains a record for every DB file on the system. There are codes on the file that say whether the file is an LF or PF and if a PF whether it is a data or source file. To get a list of source files, in SQL execute the following: SELECT * FROM qadbxref WHERE DBXATR = 'PF' and DBXTYP = 'S' This will get you a list of all source physical files on your iSeries. If you want just those in a particular library add selection to your WHERE.
    655 pointsBadges:
    report
  • McSick
    You can also use the Display Object Description command to locate Source Physical Files: DSPOBJD OBJ(*ALL/*ALL) OBJTYPE(*FILE) OUTPUT(*OUTFILE) OUTFILE(YOURLIB/DSPOBJDFLE) then use WRKQRY if you have it to query the file for PF-SRC files.
    30 pointsBadges:
    report
  • WaltZ400
    DSPOBJD finds all physical files in a library with an object type of *FILE and an object attribute of PF. Both source and physical data files are tagged this way. So unless your shop only uses Q* default names for source files and follows the IBM recommendation that you don't name any user objects starting with Q, I don't see how a DSPOBJD will find only source files. File QADBXREF is built by the operating system and is constantly updated as new files are added, changed or deleted. And the data on this file knows the difference between a data or source PF.
    655 pointsBadges:
    report
  • TomLiotta
    Note that file QSYS/QADBXREF is a physical system file that is in constant use by DB2 itself and technically should not be accessed directly. Unusual interruptions of system activity against this file can be troublesome causes of database catalog inconsistencies. The RCLSTG SELECT(*DBXREF) can help correct such inconsistencies, but database operation is somewhat unpredictable until corrections are done. It is better to use any of the logical files and SQL views that IBM has provided to review the info. For example, logical file QADBXATR provides field DBXTYP to expose 'D'=Data or 'S'=Source physical file. A full list of LFs/views can be seen from DSPDBR QADBXREF. Tom
    125,585 pointsBadges:
    report
  • MichelleDavidson
    [...] Finding source physical files [...]
    0 pointsBadges:
    report
  • venky41561
    HOW TO CHANGE THE ATTRIBUTES OF A PF WITHOUT LOOSING THE DATA
    10 pointsBadges:
    report
  • TomLiotta
    HOW TO CHANGE THE ATTRIBUTES...   Can you explain how this relates to finding source files? If not, then you will be better off opening your own question. When you open your question, you need to include a list of "attributes" that you want to change.   Tom
    125,585 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