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)

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the basic features of seu?

613


how do handle file exception/error?

648


how do you pass parameters in cl?

1055


what is the disadvantage of using global variable?

688


what is *iso date format?

625






define subsystem?

1033


WHAT is STORED PROCEDURE CONCEPT IN AS400 WITH EXAMPLE?

2035


what is the use of sflend keyword?

978


how can you detect and handle a record lock situation?

1215


maximum number of subfiles that can be active for a single file is?

974


What Is The Error If We Don't Get Login Screen?

677


how will you display a particular page in subfile ?

1052


what is the purpose of overrides?

1023


What is binder language ?

1365


Hi,Please give me the the answer for these quesitons? 1.what is IFS and ICF and RAPE amd DISKET fils? explain with example please? 2.What is the difference between POST AND SPACE OPCODES? 3.Can anybody tell me default printerfile command and object type?

2087