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
can I touch the array during treatments?
We have job which is running as batch. It takes atleast 06 hours to complete tht job. But I wanna do tht job with in 3 hours?
How can we override a file during runtime in rpg?
thanks mr.Harshad R Suryawaunshi,i'm new to as400 i think you are telling in rpgile i know only rpg400 if possible can you tell in rpg400
are there any useful c runtime apis that I can call from rpg iv?
during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.
if there is a module object , how to find the program object for this module object.Assume the module object name and program object name is not same.
Please tell me how to read the records from a file with load an array of size with error conditions(The logic answer for this question is ARR is array of 99 elements Z-ADD 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN99 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO).So,Please give me the complete of this code.
How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?
which program rpg or cl is efficent to update a transaction onto a database file and why ?
How can we know running job is batch or interactive?
how can you display specific subfile page on the screen in unequal subfile?
How to select highest score of each subject or how to select highest income of every month?
1.Load an runtime array of length 99 from the pf and you want to handle all the possible errors?
what is *place and *auto keyword in prtf ?plz explain