Display only the PFs and the number of records in each PF, from a library

5 pts.
Display File
Physical File
Get the library name from a different user , accept the library name , then send the list of only the Physical files in that library , along with the number of records in each PF , to that user.

Answer Wiki

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


You can use DSPFD to an output file to get these details.


Martin Gilbert.

Discuss This Question: 1  Reply

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.
  • Sloopy
    There is a fast way to do this. In the QSYS library there is a bunch of system files beginning QADB*. These files are maintained by the system and must only be opened for read-only. The file QADBXREF contains a list of ALL the physical and logical files on the system, and SQL views and indices, in all libraries. You can write a query or SQL to extract the information you want. The fields in this file are:
    DBXFIL     File name                                         
    DBXLIB     Library name                                      
    DBXDIC     Dictionary name                                   
    DBXOWN     User profile name of owner                        
    DBXTXT     File text                                         
    DBXATR     PF-physical,LF-logical,TB-table,VW-view,IX-index  
    DBXLNK     E-ext described, P-pgm described, Blank-no link   
    DBXSQL     I-IDDU,S-SQL,C-CRTDTADCT,X-migration,Blank-no link
    DBXTYP     D-data file, S-source file                        
    DBXNFL     Maximum number of fields                          
    DBXNKF     Maximum number of key fields                      
    DBXRDL     Maximum record length                             
    DBXIDV     Dictionary internal file definition ID            
    DBXREL     Relational file: Y=Yes,N=No                       
    DBXLFI     Long file name                                    
    DBXLFQ     Long file name is quoted                          
    DBXWCO     C-CASCADED, Y-Yes (local), N-No                   
    DBXUPD     Y-Yes, N-No                                       
    DBXUNQ     D-No, V-Yes (allow NULL duplicates), U-Yes, E-EVAP
    DBXREM     Long file description                             
    DBXDFN     SQL VIEW definition                               
    DBXATS     File change timestamp                             
    DBXLB2     Library name                                      
    DBXADB     Alias Relational Database name                    
    DBXALB     Alias Library name                                
    DBXAFL     Alias File name                                   
    DBXAMB     Alias Member name                                 
    DBXINSERT  Y-Yes N-No                                        
    DBX_PASP   Primary ASP                                       
    DBXSO      Y-S/O logical, D-DYNSLT, N-Not S/O Logical        
    DBXSYS     Y-System File                                     
    DBXPART    Number Of Partitions                              
    DBXDEFINER Definer        
    The keys to the file are DBXLIB, DBXFIL. There are a number of logicals over this file, which will give you different views of the data. Some of these logicals are in QSYS, others in QSYS2, and yet others in SYSIBM. If you access the data using SQL, don't use the logicals! Regards, Sloopy
    2,195 pointsBadges:

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.

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


Share this item with your network: