AS/400: Read member from physical file

450 pts.
Tags:
AS 400
Physical File
There are 10 members in physical file and how to read 7th member from that file?
1

Answer Wiki

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

use the command 

DSPFD FILE(MYLIB/MYFILE) TYPE(*MBRLIST) 
OUTPUT(*OUTFILE) OUTFILE(QTEMP/MEMBERS) 

to dump the members to a file then set the rrn to this file for the member name

Discuss This Question: 5  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.
  • Splat
    If you know the member name, or can retrieve it, either use OVRDBF to point to the member prior to opening the program or pass the member name as a parameter to the program & specify the parameter in the EXTMBR keyword.
    12,915 pointsBadges:
    report
  • TheRealRaven
    It depends on what you're using to "read" the member. Define "read" for the appropriate reply.
    36,145 pointsBadges:
    report
  • vivekntt21
    How to retrieve members from the physical file?
    450 pointsBadges:
    report
  • vivekntt21
    I want retrieve 7th member from that file and use that in RPG program to read that member file.
    450 pointsBadges:
    report
  • GregManzo
    As Splat says, if you know the member name you can pass it in and override to it or use EXTMBR.
    If you want to query the file to get a list of members & find the 7th one, there are a few techniques available. An easy one is to do DSPFD *MBRLIST to an outfile. Or there are several API's (QDBRTVFD, QUSLMBR, etc.) that you can call.
    2,970 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.

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

Following

Share this item with your network: