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
what is join logical file?
how you get the relative record in a subfile in which cursor is located?
Can any one explain the basic things about RLU and Printer Files and their Definitions for both and why are they used,i'm a newbee so please help me out
What is the draw back of Procedures? why we are going to Modules?
Can level check error occur if we do chgpf?
. How to know why the OPM job is in MSGWAIT state?..WHAT COULD BE THE REASON FOR it?
how can u check no of records in a file?
what is the function of crtdupobj command?
what is the use of dspatr(mdt) keyword?
in conjunction with which statements can orxx and andxx conditions be used ?
what is the disadvantage of using global variable?
which type of object is used in db2/400?
How to avoid using indicators in ile ?
What is RETURN CURSER LOCATION in subfile?
What is the maximum number of subfiles that can be specified in a display file?