I wanted to list all the source physical files (only SRCPF not PFs) in a library using API. Which API should I...
use? My intention is to build a WRKMBR utility just like WRKOBJ. I tried "QUSLOBJ" API, but it's not differentiating PFs and SRCPFs.
I would skip using the API and use an IBM system file instead. File QADBXATR in library Qsys should provide you the listing you are looking for. This file is keyed by type (which in your case will be an 'S' for source files), library and then file name. Be aware that access to this file is restricted so you may need to compile your program to run under another user profile to read this logical file. Since this is a system file, you should only read from this file and do not attempt to update it.
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your programming questions--or help out your peers by answering them--in our live discussion forums.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.
Dig Deeper on RPG iSeries programming
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.