Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

can any one pls tell me some differences between a LF and
command OPNQRYF?

Answers were Sorted based on User's Feedback

can any one pls tell me some differences between a LF and command OPNQRYF?..

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 ?    29 Yes 0 No

can any one pls tell me some differences between a LF and command OPNQRYF?..

Answer / senthilkumaran

The main difference is : Logical file creates permanent
object on the system. OPNQRYF creates temporary access

Is This Answer Correct ?    16 Yes 0 No

can any one pls tell me some differences between a LF and command OPNQRYF?..

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

Post New Answer

More DB400 Interview Questions

Is it possible to create a logical file whose Physical file is not in same library?

6 Answers  

1. How can I create a LF using crtlf command based on a particular member in a multimember PF? Where I have to specify the member name? 2. How to differentiate between the types of join from a Join logical file DDS. Is it possible to have different types of Join Logical files? 3.Any performance difference between Opnqrf and Embedded SQL? When I should prefer Opnqryf and when SQL? 4. I know access path is the path chosen by the program to retrieve data. It can be of keyed access path or arrival sequence. *IMMED- *IMMED description says access path is updated each time record is added or deleted from a member. - What is updating here? *REBLD - The access path is completely rebuilt each time a file member is opened. The access path is maintained until the member is closed, then the access path is deleted. - I am not able to understand this completely. Could anyone explain these more clearly? 5.What is the purpose of using activation group. I know it is a resource allocator, but other than this any other benefits of using an activation group?

2 Answers   IBM,

what is use of self join and which cases you will use this join

1 Answers   TCS,

what is the purpus of the chain and setll and setgt ?

2 Answers   Four soft,

How to know the particular record in pf with out reading?

0 Answers  

I want to change the attribute of field or want to add new field in existing PF but condition is format level identifier should not change, is it possible?

9 Answers   Mind Tree, TCS,

Can anybody tell why Journalling is compulsary before Commitment Control?

2 Answers  

how to restrict upon adding the data for field reference file in DB400

1 Answers  

Why journalling is compulsory before commitment control?

1 Answers  

what is the intractive job? what is the batch job ? how to change the batch job to interactive job?

2 Answers   Four soft,

How can i retrieve city while my i have one field address length 60 but i don't know what where is city in this field ?

4 Answers  

Is Constent can be define as a key field?

3 Answers