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

What is Group Job?

1 Answers  


what is OUTFILE?what is the uses and disadvantage? where we can use this?

2 Answers  


What is FCFO, FIFO, LIFO in Database environment ?

1 Answers  


how to run other job when one job is active?

0 Answers   IBM,


can you specify a display file to be used in the following modes input,output, or combined modes ?

1 Answers   IBM,






what is the maximum number of subfiles that can specified in a display file ?

1 Answers   IBM,


Space & Skip Are Which Level Keywords?

0 Answers   IBM,


How can u create a temporary file in CLP @ how to access that temporary file in RPG program?

4 Answers  


How to convert a spool file to PDF file in AS400?

0 Answers  


How can we change the uppercase to Lowercase in RPG?

0 Answers  


Q.Hi All friends, I have one Question, I have three fields in display file SUP LOT, ISSUED to Prod and Line Grp. Field SUP LOT is mentioned in one field reference file WRSLT and key field as a key field LP.Fields ISSUED to PROD,Line GRP are mentioned in the another Field reference file WMDTF. So I want to read SUP LOT on the basis of key field LP from the first file WFSLTand then i want ot read another two fields ISSUED to DATE and LINE GRP from second file on the basis of SUP LOT, which i got from first file.Now i want to display these fields in the display file DSPWMMS. but Condition is that 'Supplier Lot,ISSUED to Prod and Line Grp will not be shown if their respective fields are blanks/Zero. Please Let me Know coding part of this senerio and what would be coding for display file to now shown fields if fields are blanks/zero. My mob. no. is 9836300345. Please reply me asap.

1 Answers   IBM,


Why do you use Keep and Assume Keywords.

2 Answers   Four soft,


Categories