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
Answers were Sorted based on User's Feedback
Answer / surya siram
Hi,
It is better to use "EXTMBR" with *all (EXTMBR(*all)) and then use file information data structure. EXTMBR(*ALL) is used to read the all the members of the file and file information data structure is used to know which member of the file is reading. Then by using this you should to skip the first 4 members and then read the remaining 6 members.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / ravi kumar
hi,
You can use
FFILE1 IF E K DISK IGNORE(RECFMT9:RECFMT10)
here if file1 contains 10 members. I want use first 8 members then use ignore keyword as it is above.
FFILE1 IF E K DISK INCLUDE(RECFMT1:RECFMT2)
here if file1 contains 10 members. I want use first 2 members then use include keyword as it is above.
| Is This Answer Correct ? | 0 Yes | 2 No |
1) How to declare a file? 2) How to define a display file? 3) How to monitor error messages in RPG? 4) How to find the attributes for subfiles? and what is the DDS for subfiles?
What hapens when we use CPYF command to copy a LF? On which PF will it be dependent???
i want to retrieve record b/w 2 dates in as400
How to change the name of physical members Dynamically?
what is the use of sflnxtchg?
suppose if we want to update the data in cl what we will do?
HOW DO YOU DISPLAY A DISPLAYFILE AT OTHER WORKSTATION? CAN WE MOVE A PHYSICAL FILE? WITHOUT MOVING A FILE?
How can we receive values from a called procedure in RPG?
I have a PF(ABC)with no key fields. PF(ABC)have 2 fields (cusno and cusname). Please let me know how can i read the cusno = 1150 directly from PF in CL and RPG program(Without creating the LF and without reading the complete file and then compare 1150)
two attributes which govern the excecution of a job>>>>??
Can we have a Physical file without any member ? Please let me know
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?