OVRDBF FILE(xxx) TOFILE(libl/filename) share(*yes)
In which scenario is share(*yes) used?
could any one explain with an example?

Answers were Sorted based on User's Feedback



OVRDBF FILE(xxx) TOFILE(libl/filename) share(*yes) In which scenario is share(*yes) used? could a..

Answer / shruti tayal

Suppose you define override on a physical file with
SHARE(*YES) in a CL program, and you call HLL programs from
CL program, by defining SHARE(*yes) all programs who use the
overridden file, will use the same data path, on the
contrary if we dont specify share(*yes), each program will
create its own data path. This is very useful when we use
OPNQRYF, if we dont specify SHARE(*YES) for the file, the
data path created by OPNQRYF will not be of any effect in a
HLL program, as HLL program will create its own data path in
absence of SHARE(*YES).

Is This Answer Correct ?    30 Yes 0 No

OVRDBF FILE(xxx) TOFILE(libl/filename) share(*yes) In which scenario is share(*yes) used? could a..

Answer / suju

when we use share(*yes) ODP(open data path) will be shared.
other wise each time system wl create new ODP.its an
overhead.

Is This Answer Correct ?    28 Yes 1 No

OVRDBF FILE(xxx) TOFILE(libl/filename) share(*yes) In which scenario is share(*yes) used? could a..

Answer / shobhit

Share(*yes) means Sharing the access path of a fileā€¦.
For example
Suppose Physical file have 5 members and you want to access
the records of 3rd member in your program. So OVRDBF
command will be like this.

OVRDBF (File Name) TOFILENAME (File Name) MEMBER (3rd)
SHARE (*YES)
CALL RPG

The RPG program now point to 3rd member of the file and if
you dont use SHARE(*YES) the program will point to 1st
member of the file.

Is This Answer Correct ?    11 Yes 31 No

Post New Answer

More IBM AS400 AllOther Interview Questions

what the purpose of ovrdta, ovrata keywords?

1 Answers   IBM,


how do you read data area in an rpg program?

1 Answers   IBM,


how can a message from a message file appear as a constant on the screen?

1 Answers   IBM,


which are the relational operators in rpg?

0 Answers   IBM,


What is the use of Data Queues?

1 Answers  






What is GDA?

1 Answers  


define what a data area is along with a brief example of what it may be used for?

1 Answers   IBM,


how you will know whether you are in sfldrop or sflfold mode?

0 Answers   IBM,


What is the Difference between command attention key and command function key ?

0 Answers   IBM,


how can I automatically refresh a web page?

0 Answers   IBM,


What is the purpose of the following? FORDHDR1 IF E K DISK ORDHDRF KRENAMEORDHDRF1

1 Answers  


Q.How can more than two program be executed in batch mode through SBMJOB in CL PGM but the condition is that program must be executed one by one?Please wtite the senario? 2. IS it possibe more then two programs can be executed in batch mode and HOw it will be executed in CL program ,please write the senario?

6 Answers   IBM,


Categories