How to read data from Nth member of a physical file containing
some X number of members in it?
"Provided member names are unknown"
Answer Posted / 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 |
Post New Answer View All Answers
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
what is the difference between do while and do until?
What are the types of identifiers?
what is the use of sflnxtchg?
can you debug ile rpg program using isdb?
1. What is bound-by-call and bound-by-reference? 2. Where and why is *Nomain used? 3. What are the difficulties faced by programmers when using service programs? 4. Explain the different ways of parsing and compiling XML in iSeries.
is this a rpg channel?
What is a record lock error?
how do I preserve and clean the array?
How to call one program from another program in RPG? please help me with the code
How to select highest score of each subject or how to select highest income of every month?
what is the procedure and explain about real time scenario.
Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?
what is a rpg?
Interviewer asked me write down DDS for load all subfile .can anybody write dds