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

Can you use multi format LF in CL program?

2 Answers  


what is the maximum number of fields under a record format of physical file?

1 Answers   IBM,


what is the function of rlu ?

1 Answers   IBM,


what is message file?

0 Answers   IBM,


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

4 Answers   HCL, iGate,


define the purpose of the %sst function?

1 Answers   IBM,


what is the maximum number of files allowed in rpg?

1 Answers   IBM,


how can you detect overflow for a print program that prints multiple lines per cycle?

1 Answers   IBM,


Can we debug the MSGW JOBS?

0 Answers  


can we retrieve dspf source?

2 Answers  


Define the purpose of Factor 1 the Operation Code and *IN15 in following code HI LO EQ C *YMD Test(D) yymmddDate 15

1 Answers  


how will you search an array?

0 Answers   IBM,


Categories