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

How can you delete a record from a file in RPG without using DELETE oppcode?

2 Answers   UST,


how to run only 10 modules of existing N modules in service program in RPGILE ?

3 Answers   Wipro,


How to declare the pull button in AS/400..

0 Answers  


Suppose you have 3 members in a database file. How to read records from all the members without using CL (OVRDBF) i.e. Entire process should be handled exclusively in a RPG program?

7 Answers  


To check the locks , we use cmd WRKOBJLCK , but how we confirm whether it's objeck lock / member lock. I confused with the Lock type and Status values...Can any body please tell me ...

5 Answers  


Are all these RPG/400 Interviewed Questions being asked recently? are current?

1 Answers  


how do I declare a table or array in rpg iv?

0 Answers   IBM,


What is the purpose of PUTOVR keyword?

2 Answers  


1.I have a Physical file with 100 records, No duplicates exists, all are Unique,But while i am running Runqry utility i am getting only 80 records..What could be the reason?

3 Answers   Cap Gemini,


What is a record lock error?

0 Answers   Wipro,


Mr.Sidc sirfor my question{how to convert date format from one format to another i think in CL/400 its CVTDAT,Please tell in RPG/400 sir not in RPGILE} you have answered using MOVE opcode,can you illustrate me with a small example sir very kind of you.

1 Answers   CTS, IBM, iGate,


i would like to know under what circumstance the object will get locked on AS400.

5 Answers   IBM,


Categories