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 can you delete a record from a file in RPG without using DELETE oppcode?
how to run only 10 modules of existing N modules in service program in RPGILE ?
How to declare the pull button in AS/400..
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?
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 ...
Are all these RPG/400 Interviewed Questions being asked recently? are current?
how do I declare a table or array in rpg iv?
What is the purpose of PUTOVR keyword?
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?
What is a record lock error?
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.
i would like to know under what circumstance the object will get locked on AS400.