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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

We have job which is running as batch. It takes atleast 06 hours to complete tht job. But I wanna do tht job with in 3 hours?

770


what is an online rpg?

729


How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?

1562


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.

2052


how can you display specific subfile page on the screen in unequal subfile?

675






How can we know running job is batch or interactive?

657


how does the rpg element work?

717


what are the key words you must use when using a subfile?

693


can anybody help me to solve this problem. the program that i m checking display error message saying "Record format for file AJDSPFFD does not match model file and decimal error. how to solve this problem. The AJDSPFFD is snapshot the AJTLOG that is the audit trail list.

2279


How can we override a file during runtime in rpg?

689


can I touch the array during treatments?

758


what happens when sflsiz = sflpag? What are the advantages and disadvantages?

710


Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg

717


What is a record lock error?

1268


what is program status data structure?

1389