what is the necessary command needed before OPNQRYF and why?

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what was the robotech rpg?

687


How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...

1315


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

1896


How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?

1564


How to call one program from another program in RPG? please help me with the code

1261






are there any useful c runtime apis that I can call from rpg iv?

700


what is a rpg?

703


1.Load an runtime array of length 99 from the pf and you want to handle all the possible errors?

2374


can you debug ile rpg program using isdb?

739


If my rpg program has a date field, what extra care I have to take while compiling that rpg program? If the file is keyed and I have declared the file as well as key list properly in my program. Still am getting an error message like "chain/reade operation is not allowed" what may be the case?

622


What is file identifier where we can use?

652


Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg

719


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.

756


What is difference between bind by copy and bind by reference?

1733


can any one help in hawkeye and turnover or any change management system plzzzzz or send the documents to my mail id :gvsp.as4@gmail.com

1971