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 |
HOW TO DELETE THE RECORD FROM MASTER FILE WHICH IS LINK BY ANOTHER TRASATION FILE WITH REFERTIAL INTYGRITY?
1.How to load Records of a Physical file(PF) in the reverse order, in CL program?
is this a rpg channel?
How to update only a field of a PF in an RPG program. I don't want to update the record, only one field.
How do you call procedures in ILE?
Setps to create .csv file on IFS folder in AS/400( V4R3)....?
How can we override a file during runtime in RPG? Without using OVRDBF or calling a CL program
What is the difference between copybooks and subprocedures in as400?
Let?s consider a variable X of length 20. Move value ?ABC? to it.How to determine how many characters does X have?
How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?
What is the compilation option that has to he specified while compiling an RPC program which uses a file having date data type field?
Suppose my file has 10 fields and I want to make the 2nd field zeros in all records. And assume I have millions of records and I dont want to read each record and update the desired field with 0. Any other way to do this in one step operation?