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 |
What is the significance of UDATE?
give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........
How can read PF in reverse order (end to start) in CL pgm..
Can we have a Physical file without any member ? Please let me know
I have a Physical File name 'File1', which is present in two libraries named 'LIB1' & 'LIB2'. These 2 libraries are listed in the library list. Would like to access data from this file from these two libraries using RPG program. How to do this, any idea?
How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique
HI,1: What is the function of 'SETON LR' AND '*INLR=*ON ? 2:Can we used "seton lr" OR "*INLR = *ON" in between the program code ? 3:if yes then according to there function the code which is written acter seton lr/ *inlr should not be execute . Can any one tell me why those code get executed ?
WHERE DO WE USE COMIT KEYWORD IN AN RPG PROGRAM? YOU MADE SOME CHANGES TO DATABASE BUT YOU DON'T WANT TO SAVE THOSE CHANGES NOW? HOW DO YOU HANDLE THIS ONE?
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.
What are the commands that can be executed in CLP but not in RPG? Why?
how can we know running job is batch or intractive ? i need all the possibilites.........plz help me
How to call one program from another program in RPG? please help me with the code