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

Answers were Sorted based on User's Feedback



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

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

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

Answer / vaiv20

Yes it can be used when u want system to point to a
particular File/Member in a library while processing a file
in a high level pgm. Example, suppose u want to use a work
file in QTEMP , although other object of the same file
exist in the current library list. other way to achieve
this is by using Keyword EXTFILE and EXTMBR on the F spec
of that file in RPGLE pgm.
I think OPNQRYF can be used without OVRDBF but that
physical file should have been defined/changed with SHARE
(*YES). This will create a data path for the file to be
shared.

Is This Answer Correct ?    13 Yes 3 No

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

Answer / geo

OPNQRYF FILE((FILENAME))

CPYFRMQRYF FROMOPNID(FILENAME) TOFILE(QTEMP/TEMP) CRTFILE
(*YES)
This will copy the records selected from Open qry file and
put it in to the Temp file in Qtem that is newly created.
One can use the file i.e. QTEMP/TEMP with the records
selectes

Is This Answer Correct ?    1 Yes 3 No

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

Answer / deepak

Hi Bharat,
How to use CPYFRMQRYF can you please provide its coding?

Is This Answer Correct ?    0 Yes 7 No

Post New Answer

More IBM AS400 AllOther Interview Questions

what is the disadvantage of using global variable?

0 Answers   IBM,


1.what is mean by compilation and runtime error? 2.How to define ALFA numeric value in pf? 3.what command is used to define a data in cl pgm? 4.What type of command is used in page at a time subfile and load all subfile?

2 Answers  


what is a logical file?

1 Answers   IBM,


(1)In Cl Program,Are PGM and ENDPGM mandatery Keywords or not .If yes, please tell me why these keywords is necessary. (2)If we will not define these two keywords (PGMand ENDPGM) then any error will be come or not.

5 Answers   FIS, IBM, Virtusa,


how to validate input values in display file ?

0 Answers   IBM,






How do you grant authority?

1 Answers  


What is the purpose of OVRATA keyword ?

1 Answers  


What is the symbol used for defining a new field in SDA?

1 Answers  


I am fresher 2009 passedout.can you pls explain me what is AS400 and where it can be used and how about growth in the position as well as salary, whether it is a programming language or else?

3 Answers  


Hi Friends, I need immediately answer for this: Senario is that,I am selecting records from the display and window subfile on the basis of Reason Code and some more fields but spool file not showing the same records which i have selected by display and window subfile. Q.What could be the causes(resons)to not show records properly (just selected in the display file and Window subfile)according the selection criteria of the records. Q.What would be the solutions to show records properly in the spool file just as selected in in the display file and window subfile according to the selection criteria.

1 Answers   IBM,


If I want to execute Sftp commands(LS & GET) stored in Physical file from CL program automatically...Can u Plz tell me how can I do this?...How the script will look?? THANX FOR NY HELP...

0 Answers  


Difference Between Ca & Cf?

0 Answers   IBM,


Categories