×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
On 14-Dec-2015 11:49 -0600, Vinay Gavankar wrote:
So if I were to have a subroutine upfront, which does a OPNDBF for
all files with SHARE(*YES), I could leave rest of my program
unchanged?
Essentially, yes. The Open Data Path (ODP) created by the Open
Database File (OPNDBF) must be /compatible/ with the open by the HLL
program; so for example, if the RPG open is keyed Access Path, then the
default [though best to specify explicitly] ACCPTH(*FILE) will match;
similarly the COMMIT specification, and there may be some others not as
easily controlled, for which sometimes a C open might be better to avoid
warnings or to overcome errors when the OPNDBF can not effect a
compatible ODP to be shared.
I have following statements already in the program:
Close FILEA;
CMD = 'OVRDBF FILE(FILEA) TOFILE(*LIBL/' +
FILNAME(S) + ') LVLCHK(*NO) SHARE(*YES)';
If the Record Format (RCDFMT) is the same for the different files,
the turning-off of the Level Check (LVLCHK) feature is unwarranted, and
even potentially problematic for lack of notification if anything had
changed unexpectedly. Also, the lack of an Override Scope (OVRSCOPE)
specification is a potential problem; the parameter has a default value
that could be changed.
CALLP(e) SYSTEM(CMD : %len(CMD) );
OPEN FILEA;
I could leave all these unchanged and my performance would improve?
Yes, because all of the existing as-coded Open and Close activity
since would be performed against the /shared open/ that was created by
the newly-coded Open DataBase File (OPNDBF), rather than continuing to
create a new ODP for each OPEN and destroy that just-created OPD for
each CLOSE. Effectively, instead of the inherently expensive
create\destroy of /objects/, the code runs a streamlined path whereby
the create\destroy activity is replaced by the inherently inexpensive
increment\decrement processing of a variable; of course there is still a
bunch of [unnecessary] external calls being made to the Data Management
and routed to the Database to effect the updates to that counter
variable [counting the number of shared opens], but to no longer
create\destroy the temporary ODP will be a noticeable saving [although
not nearly as beneficial as would be the case, if the create\destroy was
for a permanent object per that being an immensely more expensive
process involving assigning an owner and private authorities].
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.