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)

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

when are the unique constraints executed?

682


which cl command can be used at program execution to redirect the file named in an rpg program?

710


Service Program : S1 Modules in S1 : M1 M1 having two procedures : ADD, SUB Current Binder Language STRPGMEXP PGMLVL(*CURRENT) EXPORT SYMBOL("ADD") EXPORT SYMBOL("SUB") ENDPGMEXP Doubt: I need to add one new Module to the Service Program M2 having one procedure ‘MULT’ How to add this new module to the service program S1 ? If I need to recreate the service program again, Do I need to mention the Module M1 again while recreating along with new Module M2? There is no Binding Directory. Binder language structure will be like this STRPGMEXP PGMLVL(*CURRENT) EXPORT SYMBOL("ADD") EXPORT SYMBOL("SUB") EXPORT SYMBOL("MULT") ENDPGMEXP STRPGMEXP PGMLVL(*PREVIOUS) EXPORT SYMBOL("ADD") EXPORT SYMBOL("SUB") ENDPGMEXP

1932


what are the important factors in error message subfile ?

568


what do we can do with the embedded sql statements?

586






what is sflrolval?

652


which are the relational operators in rpg?

677


Difference Between Skip Before & Space Before?

674


how to write code for singlepage in sqlrpgle with update ?

2367


WHICH REPLY CODE IS USED BT sftp ? ... (e.g.226 is used by FTP IF FILE IS TRANSFERED)

1720


What are the types of data structure in as400?

543


What is %CHECK?

845


which are the member types which seu supports?

813


how to develop some simple graphs (bar charts) using just html?

669


how can we run a batch job?

733