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 I tell when to replace the array?

0 Answers   IBM,


1.How can you search an entire source file for a particular field name? 2.How can you find the differences between two versions of the source for the same program? 3.What is a hidden field as it relates to a sub file? 4.How do you display a sub file that has no records in the sub file?

8 Answers   HCL,


Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?

0 Answers  


without logical file we cannot access the data in physical file.but we specify physical file in the program(ie:- Ffile IF E k disk).how can it be accessed?

3 Answers   HSBC, TCS,


How can we know running job is batch or interactive?

0 Answers  






Can any body give the code for this quesition? Using the following details write C-Spec code to set Name to"AMMU LABS SYSTEM" D NAME1 S 10 INZ('AMMU') D NAME2 S 10 INZ('LABS') D NAME3 S 10 INZ('SYSTEM') D NAME S 20

5 Answers  


How do you proceed in case your active AS400 session has got disconnected suddenly, how can you get back to your session ? Is it possible??

1 Answers  


Need a sql query: retrieve all duplicate records in table?

1 Answers  


1.How you will find the program is batch or online in cl pgm? 2.How you will end the batch pgm when the job runs? write an logic? 3.In wich command the option *drop is used?

2 Answers   TCS,


When a object will be locked & when a record will be locked? Plz explain.

2 Answers  


1..Write an sql query to find the employee name who is having 2 phone numebr? 2.Write an sql query to the the second highest salary of the employee?

4 Answers  


Please tell me how to read the records from a file with load an array of size with error conditions(The logic answer for this question is ARR is array of 99 elements Z-ADD 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN99 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO).So,Please give me the complete of this code.

0 Answers  


Categories