HEPDB, Zebra and HBOOK initialisation
+------------------------------------------------------------+
| CALL CDPAW (NWPAW,NHBOOK,IDIV*,CHNAME,NW,NWMAX,CHOPT,IRC*) |
+------------------------------------------------------------+
- NWPAW
- Number of words of dynamic store in common
/PAWC/
- NHBOOK
- Number of words for use by HBOOK
- IDIV
- Index of user division created in common
/PAWC/
- CHNAME
- Name of user division
- NW
- Initial number of words for user division
- NWMAX
- Maximum number of words for user division
- CHOPT
- Character option
- ' '
- Initialise HEPDB divisions in common
/PAWC/
- 'Z'
- Also initialise Zebra via a call to MZEBRA
- 'P'
- Issue call to MZPAW
- 'H'
- Also initialise HBOOK with NHBOOK words
- 'U'
- Create user division
- IRC
- Integer return code
- 0
- Normal completion
This routine initialises Zebra, HBOOK and HEPDB. Note that HEPDB is
automatically initialised on the first call to CDOPEN.
Obtain file name from database prefix
+----------------------------------------------+
| CALL CDPREF (LUN,CHPREF,CHTOP*,CHFILE*,IRC*) |
+----------------------------------------------+
- LUN
- Fortran logical unit for accessing the names
file.
- CHPREF
- Two character database prefix
- CHTOP
- Top directory name constructed from database
prefix
- CHFILE
- Full file name of the database
- IRC
- Integer return code
- 0
- Normal completion
This routine returns the top directory name and full file name of a HEPDB
database, identified by a unique two character prefix. In the case of
VM/CMS systems, the appropriate mini-disks are linked and accessed
automatically. The environmental variable CDSERV must be set
before calling this routine, as shown below.
Unix Bourne shell CDSERV=/hepdb/l3; export CDSERV
C shell setenv CDSERV /hepdb/l3
Korn shell export CDSERV=/hepdb/l3
VMS CDSERV:==HEPDB:[L3]
VM/CMS setenv CDSERV cdl3.191
Access an existing database file
+------------------------------------------------------------------+
| CALL CDOPEN (*LUNDB*,LUNFZ,CHTOP,CHFILE,*LRECL*,IDIV,CHOPT,IRC*) |
+------------------------------------------------------------------+
- LUNDB
- Fortran logical unit or C file pointer for
accessing the database file.
- LUNFZ
- Fortran logical unit to be used for sending
updates to the database server.
- CHTOP
- Name of the Top Directory
- CHFILE
- Character variable giving the file name
- LRECL
- Integer variable specifying the record length
of the database file in words. If a value of zero is given on input, the
record length will be automatically determined from the file itself. The
actual value used is returned in this variable if the file is successfully
opened.
- IDIV
- User Division
- CHOPT
- Character Option
- 'E'
- Expand system division of the store in which
IDIV resides
- 'Q'
- Do not print messages such as version number
- 'N'
- The database file is in native format (exchange
mode is the default)
- 'C'
- Use C I/O instead of Fortran I/O
- 'P'
- Preserve case of file name (Unix systems)
- IRC
- Integer return code
- 0
- Normal completion
- -1
- Invalid top directory name
- -2
- The file is already open with correct LUNDB and
CHTOP
- -3
- The file is already open with wrong LUNDB or
CHTOP
- -4
- Already a file is opened with the same unique
identifier as requested for this CHTOP
- -5
- Invalid process name in Online context
- -6
- Error in IC_BOOK for booking the
CACHE
- -7
- Error in CC_SETUP for reserving the
CLUSCOM
- -8
- Cannot open journal file in server context
- -9
- Unable to open FZ communication channel
- -10
- Host unable to open RZ file
On VAX/VMS systems, C I/O is automatically triggered for files of record
type STREAMLF.
Create and access a new database file
+-----------------------------------------------------------------------------+
|CALL CDNEW (*LUNDB*,CHTOP,CHFILE,IDIV,NPAIR,NREC,NPRE,NTOP,LRECL,CHOPT,IRC*) |
+-----------------------------------------------------------------------------+
- LUNDB
- Fortran logical unit or C file pointer
- CHTOP
- Name of the Top Directory
- CHFILE
- Character variable giving the file name
- IDIV
- User Division
- NPAIR
- Number of key pairs to be used in object
selection.
- NREC
- Number of records for the database file
- NPRE
- Number of records that should be preformatted
(essential for VM systems or when afs access is desired)
- NTOP
- Unique identifier for the database file
(optional)
- CHOPT
- Character Option as for RZMAKE except
exchange mode is the default.
- IRC
- Integer return code
Terminate access to one or all database files
+------------------------------+
|CALL CDEND (CHDIR,CHOPT,IRC*) |
+------------------------------+
- CHDIR
- Character variable specifying the name of the
top directory of the file to be closed.
- CHOPT
- Character variable specifying the options
required.
- ' '
- default, close file specified by the variable
CHDIR
- 'A'
- close all files - CHDIR not used
- 'W'
- call MZWIPE for the division(s) associated with
the files that are closed.
- IRC
- Integer return code
- 0
- Normal completion
This routine closes the specified database file by calling the RZ routine
RZCLOS. Any existing journal file is closed and sent to the database
server. If option A is not specified, the journal file will be reopened
after being sent to the server.