How do I read records from Subfile? what is the purpose of
READC explain with example?

Answers were Sorted based on User's Feedback



How do I read records from Subfile? what is the purpose of READC explain with example?..

Answer / tprabhakarreddy

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

How do I read records from Subfile? what is the purpose of READC explain with example?..

Answer / syam

EXFMT = Write Screen + Read Screen
To read subfile use always READC

Is This Answer Correct ?    11 Yes 0 No

How do I read records from Subfile? what is the purpose of READC explain with example?..

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

How do I read records from Subfile? what is the purpose of READC explain with example?..

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

Post New Answer

More RPG400 Interview Questions

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.

3 Answers  


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....

1 Answers   HCL, Mind Tree,


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.

1 Answers  


How to update only a field of a PF in an RPG program. I don't want to update the record, only one field.

2 Answers  


How to print output from openquery in as400 ?

1 Answers   Four soft,






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?

2 Answers  


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?

2 Answers   TCS,


where we give the MSGSFL in rpg400?

4 Answers  


What is the difference between inner join @ outer join

4 Answers  


difference betwen keywords and opcodes

3 Answers  


Q1.How to read the Array? Q2.How to copy the content of one Array to another Array?

4 Answers   IBM,


Categories