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 |
suppose we have 10 members in physical file and i have to use 4 out of 10 so how can we read this in RPG
How Commitment and Roll back control is used in as400, explain with real time senario ???
I have 1000 records in a file. I would like to generate 10 identical reports from this record with same format (structure of records) how do I do this?
What will happen if we r using seton lr after return or vice versa.
Anybody can explain the difference between SFLCLR & SFLINZ?
How to handle duplicate error handling in RPG?
What hapens when we use CPYF command to copy a LF? On which PF will it be dependent???
I want to declare the number of elements of an array dynamically in RPGLE ? Is it possible? If yes, then how do I do it ?
Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?
wat is scan and check ? give me real time scenarios where we used these keywords in ur projects?
how do you use commitment control in rpg?
use of PUTOVR,OVRDTA,KEEP keywords?