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 |
how can we find setll setgt chain read reade readp operations are successfull or not,give example.explain in detail.
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.
i have 1000 records in pf.what are all the ways to read a particular name records in rpg?? ie.. in pf i have a name called demo appeared around 52 times hw will we read this particular records in rpg/400?.
How to sort an array in descending in RPG
What is a record lock error?
How can we override a file during runtime in rpg?
How can we override a file during runtime in RPG? Without using OVRDBF or calling a CL program
How to write record if no field or the field are different in physical file in rpgle ?
As400 Command to find the Name of the Program to which a Particular Module is Bound..? Ex: IC210AMR (*MODULE) is bound with Other Modules which Forms Program Object as IC210ABP(*PGM) . As400 Command to find the IC210ABP Using IC210AMR..? Thanks
How do you find out whether a record is present in the physical file without reading the file? for Example Employee No: 100 in an Employee master.How do we find out whther 100 is present in Employee master without reading the file?
11 Answers Bank Of America, CSC, IBM,
Errors in Sql query will be in which state?
there is any limit to display the members in rpg400?