How do I read records from Subfile? what is the purpose of
READC explain with example?
Answers were Sorted based on User's Feedback
Q1. Using EXFMT opcode or Read
Q2. READC is used for reading all changed records in subfile
| Is This Answer Correct ? | 21 Yes | 0 No |
Answer / syam
EXFMT = Write Screen + Read Screen
To read subfile use always READC
| Is This Answer Correct ? | 11 Yes | 0 No |
Answer / 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 |
Answer / karthika
READC is an opcode that is applicable only for subfile.
This will read the record that was changed during the last
execution of the program and not all the changed records
| Is This Answer Correct ? | 1 Yes | 0 No |
what is commitment control?explain about it?
How can you delete a record from a file in RPG without using DELETE oppcode?
how do I declare a table or array in rpg iv?
we are sending data of physical file to screen design and it is showing no record why?
How do you know if a record exists without doing a READ and CHAIN?
can I touch the array during treatments?
How can we receive values from a called procedure in RPG?
Job is in MSGW while reading the input file and writing a new record / updating a reacod due to Duplicate data error. What action would you take ( C D I R )...?
1. What is bound-by-call and bound-by-reference? 2. Where and why is *Nomain used? 3. What are the difficulties faced by programmers when using service programs? 4. Explain the different ways of parsing and compiling XML in iSeries.
Errors in Sql query will be in which state?
Can more than one subfile record be displayed on one line?
In ProgramB there is a SBMJOB, which is a call to program C .There is also a CALL to program D from B. How would you check the program C has been executed in D?