HP3000-L Archives

May 1998, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Michael Berkowitz <[log in to unmask]>
Reply To:
Michael Berkowitz <[log in to unmask]>
Date:
Thu, 7 May 1998 13:38:14 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (37 lines)
Denys Beauchemin writes:

>>> Denys Beauchemin <[log in to unmask]> 05/07/98 12:01pm >>>
X-no-Archive:yes
There are three (3) valid values for the mode parameter of the DBCLOSE
call.

Mode 1, close the database, if you are the only one accessing the DB at
that time, it also purges the DBG, along with all the buffers in use by
IMAGE for that database.  If you are not the only one using the database
when you close it, DBCLOSE mode 1 purges the buffers reserved for
your
process, releases all the locks your process may have in the DB, and
decrements the users counter by one.

You use mode 1, when your process (program) has finished accessing
the
database, usually at the end of the program.  It's a nice clean way of
programming.  Your program doesn't really have to use DBCLOSE,
because  MPE
will close it for you when your program ends, but you should use
DBCLOSE,
mode 1.

< balance snipped >
------------------------------------------------------------------------------------
Denys is absolutely correct, however there are times when you want to
explicitly issue a DBCLOSE mode 1.  If you open a data base each time
you enter a called subprogram, and fail to DBCLOSE it before exiting, you
will soon hit the limit of 63 DBOPENs of a data base.  It is probably better
that you pass the opened base parameter around from main to
subprogram and back in the passing parameters and avoid the extra
DBOPENS.

Mike Berkowitz
Guess? Inc.

ATOM RSS1 RSS2