What would be the result on writing a data record to a PF
file using the "WRITE" opcode after the SETON *ON *INLR
statment?
Answers were Sorted based on User's Feedback
Answer / prabhas
All files used remain opened till it executes last 'C' spec
statement
| Is This Answer Correct ? | 9 Yes | 1 No |
Answer / naveen chandra joshi
It will write the record in the database file even after LR
indicator sets on.
Program execution continues till last C specification.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / syam
Hi Prabhas thanks....Why it is writing? Seton *On *Inlr not
closing the pf file?
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / raghavendra malwadkar
It will sucessfully write the data record to a PF and only
after executing the last record, LR indicator sets on,
hence even if you specify Seton *LR any where in the
program, the LR indicator is *ON only after executing the
last record.
Hope it suffies you concern.
| Is This Answer Correct ? | 5 Yes | 3 No |
Answer / harshad r suryawaunshi
Write statement will get executed successfully and record
will get added in the file. Program execution continues til
the last line of C specs.
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / sree
The LR indicator says, the last record in the file has
reached and hence there are no input records to process. But
this will not prevent in writing the record to file.
Please correct me if I am wrong.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sakshi anand
i think it will not be executed because the files is closed when we use seton lr/or the odp is closed now.
| Is This Answer Correct ? | 0 Yes | 2 No |
Answer / sakthi
all files will be closed with inlr on and we can't perform write operation on a closed file. We will get error.
| Is This Answer Correct ? | 0 Yes | 2 No |
Answer / gsp
The 'Write' statement has to be witten before
the Lr On statement.
Reason: All files are closed and program ends
as soon as Lr is on.
| Is This Answer Correct ? | 5 Yes | 10 No |
Hi,Please give me complete code with this logic. The question is how to read the records from a file with load an array of size with error condition? (The logic is Z-Add 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN9 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO)please give me complete code with explanation?
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
1) How to define keyed file in CL pgm. 2) How can i read particular records in CL pgm from database file.
How can you delete a record from a file in RPG without using DELETE oppcode?
i have a file with the values 10, 20, 30, 40, if am setll with the value 25 then readp, so what it will return?
Why we need to give File and To file Names While we are using OVRDBF. What is your understanding related to this?
How do you do indexing in a physical file?
WHAT IS MENT BY RECORD LEVEL IDENTIFIER ? WHAT IS THE PURPOSE OF THIS?
Maximum how many files declare in rpgle
if there is pf in two libraries and there is a logical file based on the PF, how to find the pf on which the pf is based.
Q1.How to read the Array? Q2.How to copy the content of one Array to another Array?
what is kids-rpg?