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 |
I have a file .In that file i have 3 fields. Those fields are eno, ename, esal.Keyfield is eno. In that file i have data like this for eno 1,2,3,4,5. Now i need to display 2nd record. That means i need to set the pointer on 2nd record... Then, write the complete rpg program using setll.
Suppose we have 10 records with same name and we are reading using READE,after 4 record i have to use CHAIN what is the output
i want to perform uniqness on db file bt my db file nt hving key by useing rpgle.
How can you delete a record from a file in RPG without using DELETE oppcode?
wat is the difference between array and multiple occurence data structure?
Hi, Can anybody give me real sinario for SFLRCDNBR?with example?
suppose a job is running for 15 minutes after that it goes to message wait? what are the impact analysis
Let?s consider a variable X of length 20. Move value ?ABC? to it.How to determine how many characters does X have?
Q1.How we can copy the data of file one session to another session? Q2.how we can execute a loop infinitely in AS/400 coding? Q3.In ALDON tool,multitask is posible on a perticular object by the user?
How to create a key field for a logical file inside RPG?
this is rpg3 code W0RTN IFEQ @CN,002 what is the means @CN,002
what built in function can be used with SETLL.If you want to check whether the search argument is successful or not? Please give me answer with example?