I know chain keyword retreive records randomly but how chain
keyword exactly works internally????
Answers were Sorted based on User's Feedback
Answer / drew
CHAIN:
positions current record to correct record based on key
sets HI indicator *ON if position fails and sets %found()
off in free-form code
reads the record fields into the automatic internal buffer
fields
locks the record, if in update mode and "no lock" has not
been added to the command ( chain(n))
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sandy
chain op code firstly set the file pointer to BOF(begin of file).then look for key or rrn which is specified in factor 1.
in rpg400 EX:
Factor1 opcode factor2 Key/rrn chain file name/record format name
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / nkumar
With chain High indicator is defined which will be set on if record is not found. Chain works exactly like SETLL and then READ record. If the record is found it will be read and indicator will be OFF and if record is not found then indicator will be ON.
Is This Answer Correct ? | 0 Yes | 0 No |
I want my simple Green screen should refersh every 1 min ,How can I do it..? Please share the logic
1. I have2 records in a PF. READ PF DO DSPLY EMPNO RETRN DSPLY EMPNO ENDDO What was the output 2. SETON LR vs RETURN 3. Primary File 4. How to delete a deleted spaces 5. How to read a PF in reverse order in CL 6. I have a object in Lib A, B and C. But it shows in D Lib..Why? 7.
what is *place and *auto keyword in prtf ?plz explain
1.Load an runtime array of length 99 from the pf and you want to handle all the possible errors?
Is it possible to call a subfile using CL. IF yes.. kindly help me out with explanation...?
i have 6 char field in program, but this field is using in all files i want to chage field size as 10 char , how can i do this except using *like defn...?
If my rpg program has a date field, what extra care I have to take while compiling that rpg program? If the file is keyed and I have declared the file as well as key list properly in my program. Still am getting an error message like "chain/reade operation is not allowed" what may be the case?
What are the types of identifiers?
HOW DO YOU DISPLAY A DISPLAYFILE AT OTHER WORKSTATION? CAN WE MOVE A PHYSICAL FILE? WITHOUT MOVING A FILE?
what is the necessary command needed before OPNQRYF and why?
How can we override a file during runtime in rpg?
can you debug ile rpg program using isdb?