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 I automatically refresh a web page?

634


How to Define a Procedure in RPG?

1224


which are the figurative constants used in rpg?

845


what is a spool file?

673


what is cab?

663






What is the difference between iter and do? We know both are used to execute set of statements repeatedly, but what is the main difference?

549


If I want to execute Sftp commands(LS & GET) stored in Physical file from CL program automatically...Can u Plz tell me how can I do this?...How the script will look?? THANX FOR NY HELP...

2183


how many specifications are there in rpg/400? What are they?

1096


What is RETURN CURSER LOCATION in subfile?

1072


how to get the cursor position?

718


the maximum number of subfiles that can defined in a rpg program for one display file is ___ .

2178


how can u check no of records in a file?

682


What is the draw back of Procedures? why we are going to Modules?

1230


what is overlay?

684


what is the difference between seton lr and retrn?

1281