HP3000-L Archives

March 1995, Week 4

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:
Gilles Schipper <[log in to unmask]>
Reply To:
Date:
Sat, 25 Mar 1995 19:39:47 EST
Content-Type:
text/plain
Parts/Attachments:
text/plain (26 lines)
You can accomplish what you want quite effectively using dynamic or
non-dynamic subprograms. The key here is to maintain the database-name data
(including the 2-byte file number returned from dbopen, which is
initialized to low-values - binary 0's) in the main calling program (also
generally referred to as the outer block). This parameter is passed to any
subprogram required to access the data base. The actual data base open can
be performed by any of the subprograms (either dynamic or non-dynamic).
Prior to any required database access, the corresponding file number is
checked for equality to binary zeros, after which a call to dbopen is
performed only if true.
 
Since the file number is maintained by the main program and passed to
appropriate subprograms via the linkage section, the data base need be
opened only once.
 
Should not be too difficult to modify your programs accordingly.
 
I'll be happy to e-mail sample code when I return from IPROFs.
 
*************************************************
Gilles Schipper
GSA Inc.
Tel: 905/889-3000
Fax: 905/889-3001
*************************************************

ATOM RSS1 RSS2