How to find out number of members in Source file ?

695 pts.
Tags:
AS/400 commands
CL
QRPGSRC
RPGILE
Hi All, i want to find out how many number of members are available in one source file. For example i have created one source file (QRPGSRC) in (LIBRARY1) now i want to find how many sources are available in LIBRARY1/QRPGSRC this source in my RPGILE program. Do we have any AS400 command or API to do this please help me. thanks in advance.

Answer Wiki

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

Yes,

We can achieve with this :

WRKOBJPDM LIB(SARKNS) OBJTYPE(*FILE) OBJATR(‘PF-SRC’)

I hope it’s only your requirement.

If you are Mohan Kinnera, then I am Zilan Basha (contactatgeelani@gmail.com).

Hi Thanks for your response..

but i want to retrive number of members for particular source file in particular library in my RPGLE program

sorry i am not Mohan Kinnera i am Mohan K

Discuss This Question: 3  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
  • WoodEngineer
    We use this method: DSPFD lib/sourceFile TYPE(*MBRLIST) Output can display, print., or go to an output file. For a quick answer, let the results display, then scroll down to the bottom where you will see this line: Total number of members . . . . . . . . . : 89
    6,345 pointsBadges:
    report
  • WilsonAlano
    Hi, You can use QDBRTVFD API to retrive information about the source file. It seems complicate but number of members is in the first structure of retrieved data. Regards, Wilson
    2,485 pointsBadges:
    report
  • Bsd167
    Hi, As woodEngineer mentioned, use this cmd 'DSPFD FILE(LIBRARY1/QRPGSRC) TYPE(*MBRLIST) OUTPUT(*PRINT)' And last page from the generated report you will find the following information Total number of members . . . . . . . . . : nn Total number of members not available . . : nn Total records . . . . . . . . . . . . . . : nnnnnn Total deleted records . . . . . . . . . . : n Total of member sizes . . . . . . . . . . : nnnnnnnnnn Also, you can change the output to outfile, as you like. good luck
    65 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