what is the main use of OPNQRYF ?? in that query why we can
use OVERDBF and in that OVERDBY why should we use SHARE(*YES)

Answers were Sorted based on User's Feedback



what is the main use of OPNQRYF ?? in that query why we can use OVERDBF and in that OVERDBY why sho..

Answer / kapil kumar

It is not mandatory to use OVRDBF(*Yes) before OPNQRYF. You
can still use OPNQRYF without OVRDBF.
But here the pupose of the OPNQRYF won't be solved. Opnqryf
creates its own Open data path and to share the same data
path in a program we use ovrdbf share(*yes), if we do not
use ovrdbf, then program will have its own ODP, so it will
read the file from begining on which query has been run. So,
OPNQRYF selected records will have no importance. So, we
need to use CPYFRMQRYF command and put the selected records
in to runtime file and use that file to read in program

Is This Answer Correct ?    19 Yes 0 No

what is the main use of OPNQRYF ?? in that query why we can use OVERDBF and in that OVERDBY why sho..

Answer / swarn

It also depend on how the PF was created initially. At the time of creation of PF,if SHARE parameter is specified as *YES, we do not need to specify OVRDBF Share(*yes).
By default it is *no when we create a PF.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More IBM AS400 AllOther Interview Questions

writing an sql statement from selecting records from two files using single statement and nested select statement.

0 Answers   IBM,


To Add A File To The 'file Selection' Option Of A Query, The Function Key To Be Pressed Is?

0 Answers   IBM,


Explain this error: "all record formats for externally-described file abcd ignored or dropped due to error; file ignored."?

0 Answers  


how to write *pssr ?

0 Answers   IBM,


at what level s,o are defined and what they will do?

1 Answers   IBM,






What is difference between CAT, TCAT, BCAT?

1 Answers  


Can an indexed file be accessed in arrival seQuence in RPG program ?

1 Answers  


define the purpose of the *cat function?

1 Answers   IBM,


pf named karthik 3members jan feb mar cmd must executed create mbr ar ap

0 Answers  


what is sflrolval?

0 Answers   IBM,


Describe about Query/400?

1 Answers  


what is message file?

0 Answers   IBM,


Categories