can any one pls tell me some differences between a LF and
command OPNQRYF?
Answers were Sorted based on User's Feedback
Answer / vaiv20
LF creates a new object in the system while that is not the
case for OPNQRYF.
LF creates a permanent data access path to the physical
file that will be updated as and when and add,update and
delete operation is performed on file Whereas OPNQRYF
creates a temporary access data path that is shared by high
level pgm for further processing of recs in file.
| Is This Answer Correct ? | 30 Yes | 0 No |
Answer / senthilkumaran
The main difference is : Logical file creates permanent
object on the system. OPNQRYF creates temporary access
path.
| Is This Answer Correct ? | 16 Yes | 0 No |
Answer / amit
I agree with Vaiv20. Just want to add that OPNQRYF is used
with keyword Share(*Yes) and that's what makes the ODP
avaiable to high level pgms.
Also the usage of OPNQRYF is for adhoc jobs that are
executed once in a while whereas LF is used in case where
the ODP is going to be used pretty regularly. So LF object
would be prefered when the usage is going to be regular
where as OPNQRYF would be good where the job is going to be
once in a while.
LF would make the job faster compared to OPNQRYF though ti
depends on what kind of maintenance option you use for LF.
| Is This Answer Correct ? | 9 Yes | 0 No |
wirte a simple program for read file in cl
How to update physical file using logical file with example?
What is FORMAT keyword and its use?
In how many ways we can create a logical file?`
how to see number of logical files depending on a pf?...can we declare more than 20 logical files from a single pf? is it possible
pls anyone explain about compile time array,pre run time array run time array
Is it possible to create a logical file whose Physical file is not in same library?
There is one string as A B C and wanted to display string as Shri A Shri B Shri C, how we can do this in sql? If we have around 100 values in string like this, each value should be displayed with initials as Shri.
When we create a pf and did not fill up maint parameter, then by default which access path will the system take & why?
How can we know that a trigger has been added on a PF? and what is the purpose of adding a trigger?
Last statement of any RPG pgm is LR?
What is the interactive job? What is the batch job? How to change the batch job to interactive job?