185 pts.
 What is Open Data path in OVRDBF?
What is meaning of Share(*yes) In Ovrdbf?

Software/Hardware used:
ASKED: October 15, 2010  5:28 AM
UPDATED: March 28, 2012  6:43 AM

Answer Wiki:
that file will be used, shared by subsequent programs within the scope of the override.
Last Wiki Answer Submitted:  October 17, 2010  12:42 am  by  philpl1jb   44,180 pts.
All Answer Wiki Contributors:  philpl1jb   44,180 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

The Open Data Path (ODP) is the set of structures built in memory by the operating system when you open a file. It contains pointers to all of the operating system routines that are valid for the file. It also contains the buffers used to transfer records (or blocks of records) between your program and the file. Other related elements are included.

For example, there will be a pointer to the system routine that writes records to database files. If the file was opened to a printer file, the pointer in that part of the ODP would point to the routine that outputs to a printer. Everything related to the type of device is linked to through the ODP.

When you apply an override, the job applies it to the ODP that is created when the file is opened. The library name might be changed. The file name might be changed. Device attributes might be changed. Even the device type might be changed.

Every program within the scope of the ODP will see the same changes.

When an ODP is shared, the scope of the ODP grows. Multiple programs will be connected to the same set of data structures. That includes record buffers, device attributes, whatever was used to build the ODP.

Since the record buffers are shared, if program A reads a record from the file and calls program B, then if program B opens the same file and reads a record, it will get the second record in the file. Program B can end and return to program A. If program A then reads another record, it will get the third record in the file even though program A has only issued two reads.

In short, the ODP is what gets built in memory to connect a program to a file.

Tom

 108,055 pts.

 

Absolutely wonderful explaination Tom, as usual.
…connect a job to a file I think the last line should read job instead of program.
Phil

 44,180 pts.

 

…connect a job to a file I think the last line should read job instead of program.

In light of the question about “SHARE(*YES)”, that might be a worthwhile way to think of it. Programs connect to files through ODPs, but the ODPs can be accessed by multiple programs in the same job. When shared, they are reasonably thought of at the job or activation group level.

Tom

 108,055 pts.

 

It means that if the member is opened more than once then the same open data path is shared with each program in the job.

 10 pts.