How to read data from Nth member of a physical file containing
some X number of members in it?
"Provided member names are unknown"

Answers were Sorted based on User's Feedback



How to read data from Nth member of a physical file containing some X number of members in it? &..

Answer / sandey243

Way:1
We can execute DSPFD with *OUTFILE option, using QCMDEXC in
RPGLE program then we can read the outfile to get the name
of the file, then after we can read the file.

Way2:
Make the file to have all members available i.e.,
EXTMBR(*ALL). Then move *HIVAL to RRN and do a SETGT on the
file... this will take the control to the bottom of the
first member...then READ will give you first record of the
Second member...... This way we can go to the member....
(This method I tried and succeeded)...

Is This Answer Correct ?    10 Yes 1 No

How to read data from Nth member of a physical file containing some X number of members in it? &..

Answer / deva

using EXTMBR

Is This Answer Correct ?    1 Yes 1 No

How to read data from Nth member of a physical file containing some X number of members in it? &..

Answer / zavith ahamed

to declare f spec extmbr(*all) to read the  data from file

Is This Answer Correct ?    0 Yes 1 No

How to read data from Nth member of a physical file containing some X number of members in it? &..

Answer / sakshi bansal

I tthink we can use OVRDBF command in Cl and call RPG through it.

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More RPG400 Interview Questions

what is program status data structure?

1 Answers   IBM,


What is the purpose of PUTOVR keyword?

2 Answers  


How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...

0 Answers  


RPG/400 number of Records present in a physical file using file information data structure FPF001 IP E DISK F KINFDS INFDS1 IINFDS1 DS I *RECORD RECORD Is this coding correct sir,i have given I P E that is I- input,P-primary file,E-externally described. Primary to use RPG logic cycle,is this the correct method because we have to find number of records present using file information data structure in RPG/400 without doing any input/output operations on the file and also without using DSPFD,SQL. If the above coding is correct means,when i compile the program it gets compiled,but if i call the program it does not return anything,i need number of records,please complete the coding sir.

1 Answers   IBM,


how can we find setll setgt chain read reade readp operations are successfull or not,give example.explain in detail.

4 Answers   iSoft, Wipro,


suppose if we want to update the data in cl what we will do?

9 Answers  


What is the difference Return and InLr?

3 Answers  


Hi guys. Im in AS/400(RPGLE,CLP) from last 1 year.Now i wan to upgrade my Knowledge in AS/400. Suggest me some new fields & courses which falls under AS/400. Waiting for your quick Response.

1 Answers   Voltech,


without logical file we cannot access the data in physical file.but we specify physical file in the program(ie:- Ffile IF E k disk).how can it be accessed?

3 Answers   HSBC, TCS,


Q1.How to read the Array? Q2.How to copy the content of one Array to another Array?

4 Answers   IBM,


What is the difference between copybooks and subprocedures in as400?

0 Answers  


If I have a file with 5 record and that file has 2 Key field and I want to read the unique record of the file then how can we achieve it?

1 Answers  


Categories