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
How to handle duplicate error handling in RPG?
How can we know running job is batch or interactive?
what do you mean by an input subfile, what are the keywords required?
how can I tell when to replace the array?
How to select highest score of each subject or how to select highest income of every month?
what is the difference between do while and do until?
do you use message subfiles? What are the necessary keywords required coding a message subfile?
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...?
during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.
can I touch the array during treatments?
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 are the key words you must use when using a subfile?
is this a rpg channel?
what is *place and *auto keyword in prtf ?plz explain
what is an online rpg?