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

which are the string manipulation opcodes?

621


how does the runqry show the output?

879


what is the sequence when using cursor?

603


what is xfoot opcode ?

1049


how to read database records without locking them?

1128






can anybody give the interview questions list of RLU. plz mail me: dinesh_sati07@yahoo.com

2234


what is term cua , saa?

950


Apart from opening of a file do we have any other use of USROPN?

952


if dspatr(pc) and csrloc were specified for a format, which keyword would have priority?

1002


What Does 'sr' In Columns 7-8 Of C Specs Mean?

1063


Why we sometimes use same file name in file and tofile in ovrdbf and sometimes different?

654


define data structure?

1013


maximum number of subfiles that can defined in a rpg program for one display file is?

1024


all i need to know about cmpseqdat parameter in cmppfm, how it works and can we retrieve line sequence and date from the output?

2409


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

792