what is the necessary command needed before OPNQRYF and why?
Answer Posted / abhishek bajpai
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 ? | 20 Yes | 2 No |
Post New Answer View All Answers
Explain mdt?
How to handle duplicate error handling in RPG?
are there any useful c runtime apis that I can call from rpg iv?
How to call one program from another program in RPG? please help me with the code
How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...
How to declare the pull button in AS/400..
which program rpg or cl is efficent to update a transaction onto a database file and why ?
what are the key words you must use when using a subfile?
can you debug ile rpg program using isdb?
What is the purpose of record level identifier?
What is a record lock error?
what was the robotech rpg?
write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen
what is *place and *auto keyword in prtf ?plz explain
what is the rpg system?