Can we use OVRDBF command without using of OPNQRYF ?
Or can we use OPNQRYF command without using of OVRDBF
command ?

Answer Posted / bharat

OVRDBF can be used separately without opnqryf to override
the attributes of file.
Now, OPNQRYF without ovrdbf, is also possible:
opnqryf creates the 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
recoreds in to runtime file and use that file to read in
program.

Is This Answer Correct ?    43 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how do you specify page overflow indicator for printer files in rpg?

1474


In RPG How to read a records from a file without using read opcodes?

970


what is the difference between seton lr and retrn?

1292


in conjunction with which statements can orxx and andxx conditions be used ?

1145


what is maximum number of arrays allowed in rpg?

1189






define what a data queue is along with a brief example of what it may be used for?

1077


How can we change the uppercase to Lowercase in RPG?

933


what is a query can be run in which mode?

864


what are the different opcodes available in rpg for database access ?

819


which type of object is used in db2/400?

651


what is the use of dspatr(mdt) keyword?

1454


when do you explicitly open files and close files in an rpg program?

1193


what does check opcode do ?

1069


an access path may be in which sequence?

635


what are different types of substems?

1348