How do I read records from Subfile? what is the purpose of
READC explain with example?
Answer Posted / ravi
When you declare SFLNXTCHG in the DDS. You can use READC opcode to find the changed records in the subfile. The MDT will be ON on the changed record. Once you read the record, it changes to off. This is how system identifies the changed records sequentially.
Best example is do WRKMBRPDM, it is nothing but a subfile. You can see all source members in your source file. Correct?
Now, enter display (option 5 i guess?) on say 5 sources and press Enter, control goes to the fisrt source and press enter, control goes to the second source etc.. isn't it?
That is nothing but READC usage.
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
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 data area and how it is used in rpg program ?
How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique
How to write record if no field or the field are different in physical file in rpgle ?
What is the difference between copybooks and subprocedures in as400?
what is program status data structure?
Explain mdt?
What is the difference between iter and do?
When it is desirable to describe files Internally?
how do I preserve and clean the array?
what is the difference between do while and do until?
Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?
What is file identifier where we can use?
When we have a file with Duplicate records and I want to read the unique record from the file. For example a file containing Emp Name as 'Ram' and there are 3 entries of it. So how to read a unique record from File?
which program rpg or cl is efficent to update a transaction onto a database file and why ?