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 the necessary command needed before OPNQRYF and why?

5 Answers  


Why we need to give File and To file Names While we are using OVRDBF. What is your understanding related to this?

2 Answers   Cap Gemini,


When it is desirable to describe files Internally?

0 Answers  


how to display all the members records in a physical file without using ovrdbf?

9 Answers  


Hi guys, anybody know How RPG/400 code can be converted to RPG IV code with a single command?

1 Answers  






suppose we have 10 members in physical file and i have to use 4 out of 10 so how can we read this in RPG

3 Answers   TCS,


How to update physical file in rpgle without using display file?

4 Answers   GalaxE, IBM, TCS,


can i use UPDDTA command in rpg program in which contains a file

1 Answers   TCS,


how do I play {insert rpg system here}?

0 Answers   IBM,


two types of read performed in dataqueue?????

4 Answers   CTS,


1.find most occurrences of a character. for exm: input:aaabbbbdddddyyy output: d 5 times how can i get that?

13 Answers   HCL,


Hi,This is raju.Can any body give me the real experience answer for this question? 1.What is the significance of *MAP and *DROP in the CPY command?

3 Answers  


Categories