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 |
I have some doubts on subfile----------- -----I wrote a prog on subfile to display the records. Every thing is clear but i defined a field called "opt" as input field in subfile record format from that input field i wish to enter into new screen called "EDIT" which i created it as a separate RCD in display file. i gave opt as 2 for edit just like in WRKMBRPDM screen please telll me the code and how can i code for it in RPG.
HOW TO DEBUG A BATCH JOB WHEN IT IS IN MESSAGEWAIT(MSWG) STATUS.I KNOW THE STEPS FOR BATCH DEBUGGING,BUT IM CONFUSING WITH WHEN WE SUBMIT ANY JOB FOR BATCH DEBUG WE PUT IN HELD STATE.SO HERE ALSO DO SAME THING OR ANY OTHER WAY,PLEASE HELP ME....
how to find whether a date format is valid or not in RPG400 not in RPGILE.Can you please write the coding for this sir,i'm new to AS400.Please help.
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 to print output from openquery in as400 ?
Can we found a record existance in a file w/o reading the file?
6 Answers Traitsys Technologies,
How to find d key field of a pf that doesn’t have source physical file?
Write the subfile logic program for the given concept. Load the data to the subfile depends upon the designation where designation is not a key field?
where we give the MSGSFL in rpg400?
What is the difference between inner join @ outer join
difference betwen keywords and opcodes
Q1.How to read the Array? Q2.How to copy the content of one Array to another Array?