[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Waldhäuser Str. 64, D-72076 Tübingen, Germany
[Uni logo]


DBCREATE Source code in dbcreate.pro

DBCREATE

Name
       DBCREATE
Purpose
       Create a new data base (.dbf), index (.dbx) or description (.dbh) file
Explanation
       A database definition (.dbd) file must already exist.
       The default directory must be a ZDBASE: directory.
Calling Sequence
       dbcreate, name,[ newindex, newdb, maxitems]  [,/EXTERNAL]
Input Parameters
       name- name of the data base (with no qualifier), scalar string.
               The description will be read from the file "NAME".dbd
Optional Input Parameters
       newindex - if non-zero then a new index file is created,
               otherwise it is assumed that changes do not affect the
               index file. (default=0)
       newdb - if non-zero then a new data base file (.dbf) will
               be created. Otherwise changes are assumed not to affect
               the file's present format.
       maxitems - maximum number of items in data base.
               If not supplied then the number of items is
               limited to 200.
Output Parameters
       NONE.
Keyword Parameters
       external - If set, then the database is written with an external data
               representation.  This allows the database files to be used on
               any computer platform, e.g. through NFS mounts, but some
               overhead is added to reading the files.  The default is to
               write the data in the native format of the computer being used.
               This keyword is only paid attention to if NEWDB or NEWINDEX
               are nonzero.  Otherwise, the database is opened to find
               out if it uses external representation or not.
               Extreme caution should be used if this keyword is used with
               only NEWINDEX set to a nonzero value.  This mode is allowed so
               that databases written on machines which already use the
               external data representation format, e.g. Sun workstations, to
               be marked external so that other machines can read them.
Procedures Used
       GETTOK(), FIND_WITH_DEF(), HOST_TO_IEEE, ZPARCHECK
Restrictions
       If newdb=0 is not specified, the changes to the .dbd file can
       not alter the length of the records in the data base file.
       and may not alter positions of current fields in the file.
       permissible changes are:
               1) utilization of spares to create a item or field
               2) change in field name(s)
               3) respecification of index items
               4) changes in default print formats
               5) change in data base title
               6) changes in pointer specification to other data
                       data bases
       !priv must be 2 or greater to execute this routine.
Side Effects
       data base description file ZDBASE:name.dbh is created
       and optionally ZDBASE:name.dbf (data file) and
       ZDBASE.dbx (index file) if it is a new data base.
Revision History
       D. Lindler, GSFC/HRS, October 1987
       Modified:  Version 1, William Thompson, GSFC, 29 March 1994
                  Version 2, William Thompson, GSFC/CDS (ARC), 28 May 1994
                  Added EXTERNAL keyword.
       Version 4, William Thompson, GSFC, 3 November 1994
                       Modified to allow ZDBASE to be a path string.
       8/14/95  JKF/ACC - allow EXTERNAL data for newindex OR newdb modes.
       Make sure all databases closed before starting W. Landsman June 1997
       Converted to IDL V5.0   W. Landsman   September 1997
       Added new unsigned and 64 bit integer datatypes W. Landsman July 2001

Last modified by pro2html on 2001 August 07 at 09:35 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically