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
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...?
write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen
what is the procedure and explain about real time scenario.
How to select highest score of each subject or how to select highest income of every month?
what are the key words you must use when using a subfile?
what is program status data structure?
are there any useful c runtime apis that I can call from rpg iv?
do you use message subfiles? What are the necessary keywords required coding a message subfile?
what is the use of sflnxtchg?
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...
what is file information data structure?
How to handle duplicate error handling in RPG?
what is the difference between do while and do until?
How can we know running job is batch or interactive?