idlastro / Database Procedures: DBOPEN

[Source code]

NAME
DBOPEN
PURPOSE
Routine to open an IDL database
CALLING SEQUENCE
dbopen, name, update
INPUTS
name - (Optional) name or names of the data base files to open.
        It has one of the following forms:
        'name'          -open single data base file
        'name1,name2,...,nameN' - open N files which are
                        connected via pointers.
        'name,*'        -Open the data base with all data
                        bases connected via pointers
        ''              -Interactively allow selection of
                        the data base files.
        If not supplied then '' is assumed.
        name may optionally be a string array with one name
        per element.
update - (Optional) Integer flag specifying opening for update.
        0       - Open for read only
        1       - Open for update
        2       - Open index file for update only
        !PRIV must be 2 or greater to open a file for update.
        If a file is opened for update only a single data base
        can be specified.
OUTPUTS
none
INPUT-OUTPUT KEYWORD
UNAVAIL - If present, a "database doesn't exit" flag is returned
          through it.  0 = the database exists and was opened (if
          no other errors arose).  1 = the database doesn't exist.
          Also if present, the error message for non-existent databases
          is suppressed.  The action, however, remains the same.  
SIDE EFFECTS
The .DBF and .dbx files are opened using unit numbers obtained by
GET_LUN.  Descriptions of the files are placed in the common block
DB_COM.
PROCEDURES CALLED
DBCLOSE, DB_INFO(), SELECT_W, ZPARCHECK
HISTORY
For IDL Version 2  W. Landsman May 1990 -- Will require further 
    modfication once SCREEN_SELECT is working
Modified to work under Unix, D. Neill, ACC, Feb 1991.
UNAVAIL keyword added.  M. Greason, Hughes STX, Feb 1993.
William Thompson, GSFC/CDS (ARC), 1 June 1994
        Added support for external (IEEE) representation.
William Thompson, GSFC, 3 November 1994
                Modified to allow ZDBASE to be a path string.
8/29/95 JKF/ACC - forces lowercase for input database names.
W. Landsman, Use CATCH to catch errors    July, 1997
W. Landsman Use vector call to FDECOMP, STRSPLIT()    Sep 2006
W. Landsman Remove obsolete keywords to OPEN   Sep 2006
Replace SCREEN_SELECT with SELECT_W, remove IEEE_TO_HOST  WL  Jan 2009
Fix typos in BYTEORDER introduced Jan 2009 G. Scandariato/W.L.Feb. 2009
Support new DB format which allows entry lengths > 32767 bytes 
       W.L. October 2010
William Thompson, fixed bug opening multiple databases Dec 2010
Fix problem with external databases WL Sep 2011
Use tooltips when no parameters called  WL Aug 2013