what is the necessary command needed before OPNQRYF and why?

Answers were Sorted based on User's Feedback



what is the necessary command needed before OPNQRYF and why?..

Answer / 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

what is the necessary command needed before OPNQRYF and why?..

Answer / kcsyam

OVRDBF with SHARE(*Yes) share the access path

Is This Answer Correct ?    17 Yes 3 No

what is the necessary command needed before OPNQRYF and why?..

Answer / sumit gupta

Hi guddu............
OVRDBF is not mandatory before doing OPNQRYF. OVRDBF is
only used to share the open data path within the calling
program(i.e we can use the selected records from OPNQRYF in
further program whose call is being made after
OVRDBF+OPNQRYF).

But is we dont use the OVRDBF command then open data path
will not be shared and if we done the RCVF on that file
after OPNQRYF(WITHOUT OVRDBF) then the selected records
from OPNQRYF will not be used and this RCVF will process
all the records from that file.

OVRDBF command is used just to share the open data path (By
specifying SHARE(*YES).
We we want to use the selected records from the OPNQRYF in
our further programs which call after this CL then we can
use CPYFRMQRYF command to copy all the selected records
from this OPNQRYF and then RCVF on this new file(which has
got generated by CPYFRMQRYF).

Is This Answer Correct ?    11 Yes 2 No

what is the necessary command needed before OPNQRYF and why?..

Answer / surendra y mudliar

OVRDBF command

Is This Answer Correct ?    5 Yes 2 No

what is the necessary command needed before OPNQRYF and why?..

Answer / guddu

Can any one explain Why OVRDBF is mandatory? with out that
cant we execute OPNQRYF?

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More RPG400 Interview Questions

can I touch the array during treatments?

0 Answers   IBM,


As400 Command to find the Name of the Program to which a Particular Module is Bound..? Ex: IC210AMR (*MODULE) is bound with Other Modules which Forms Program Object as IC210ABP(*PGM) . As400 Command to find the IC210ABP Using IC210AMR..? Thanks

5 Answers   CTS,


1.WHAT IS WRONG WITH THE CODE BELOW? C CUSTNO CHAIN CUSTMAST IF %ERROR can any body find the wrong please? 2.What builtin function will you use to achieve the following functionality? C QTY IFLT *ZERO C QTY MULT-1 QTY ENDIF

5 Answers   CTS,


Can we found a record existance in a file w/o reading the file?

6 Answers   Traitsys Technologies,


I have learnt through Net that Debugging a Batch job involves 1. Submit the job with the HOLD (*YES) parameter: SBMJOB HOLD(*YES) or Hold the job queue that before submitting the job by using the HLDJOBQ command. 2. Determine the job name, user, and number of the submitted job by using the WRKSBMJOB command. 3. Type the Start Service Job command on your screen: STRSRVJOB JOB(job name/user/number) 4. Type the Start Debug command on your screen: STRDBG 5. Release the job in the jobq. Type WRKSBMJOB and then put a 6 beside the job to be released and press enter, or, if the job queue was put on hold, release the job queue with the RLSJOBQ command. 6. A display appears when the job is ready to start, saying that you can now begin debugging the job. Press F10 to show the Command Entry display. 7. Now you can start debugging by entering an Add Break Point command: ADDBKP 8.ENDDBG 9.ENDSRVJOB I tried this for RPG/400 Program and up to six steps of the above it's ok,but for me no source is displayed and i typed DSPMODSRC in Command line but still i can't see the sourceif i press F.10 and enter command ADDBKP i don't know how to add break points through it,usually i add break points using F.6 for Interactive job debugs,but since this is batch i don't know sir,Please help me out. I was asked this question in a interview,i know only RPG/400 and i’m asking for debugging of RPG/400 program only sir. or is it only possible to debug BATCH RPG ILE JOB and it is not possible to debug BATCH RPG/400 JOB kindly help me out sir

4 Answers   HSBC,






what is program status data structure?

1 Answers   IBM,


3 members in a databasefile .how to read records from all the members?????????

4 Answers   CTS,


What is the difference between copybooks and subprocedures in as400?

0 Answers  


I have two sessions S1 & S2 under this 3 jobs(say j1,j2,j3 under session S1) And 2 jobs(Say j4, j5 Under session S2)is running. How many QTEMP & how many LDA will create for the same.

9 Answers   IBM,


how do I declare a table or array in rpg iv?

0 Answers   IBM,


HOW TO DEBUG A BATCH JOB WHEN IT IS IN MESSAGEWAIT(MSWG) STATUS.I KNOW THE STEPS FOR BATCH DEBUGGING,BUT IM CONFUSING WITH WHEN WE SUBMIT ANY JOB FOR BATCH DEBUG WE PUT IN HELD STATE.SO HERE ALSO DO SAME THING OR ANY OTHER WAY,PLEASE HELP ME....

1 Answers   HCL, Mind Tree,


Hi Viewers can any body explain me how to update and ahange the already existed data in physical file using subfile ? please explain me with the code if possible?

1 Answers  


Categories