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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

how can database records be read without lock ?

1216


can you specify a display file to be used in the following modes input,output, or combined modes ?

939


How can we arrange duplicate records in a file?

601


what are members?

607


what is the function of crtdupobj command?

1150






What are the record format field mapping options in cpyf?

611


what does defn do?

612


an access path may be in which sequence?

633


hi guys i am new for sqlrpgle, please suggest me good websites and theory and coding. plz plz its very urgent.

2129


Why we sometimes use same file name in file and tofile in ovrdbf and sometimes different?

654


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

931


what are the various types of device files?

990


what is sflinz and sflrna?

1014


the output from my cgi is correctly interpreted by ms internet explorer, whereas netscape navigator would display it as a plain text. What should I do to have also netscape interpreting the html output from my cgi?

561


when is a tag statement used in rpg?

1360