There will probably be a need to extract only a subset of the contents of a database to form a smaller private database. For maintaining the main database, the manager will have to be able to merge new or updated records from privately created database files into the main database, and there will also be the need to create `snapshot' records of the status of the current valid records in the database. Routine HDBEXTR serves these purposes.
HDBEXTR extracts records from the subdirectory (or subdirectories)
specified by the path PATHI , and also (if PATHI only leads to a
directory, not a subdirectory) the NSDIR-element CHARACTER vector
CHDIR, which contains the subdirectory names (optionally, records
from all subdirectories are extracted). The extracted records are
valid for the period of validity specified in the integer vector
KEYS. If the W option is not requested and there is more than
one valid current record, appropriate for the given type, in the range
then a series of summary records (each of which compresses the
information from the chain of records which apply to a part of
the period of validity) is created. The extracted record is written into
the corresponding subdirectory in the file with top-directory name
PATHO.
There is also additional information written which is needed for
book-keeping when databases are merged
(see also option E in HDBSTOR and HDBSTOM).
If the user only wants a copy of the database records he can
choose option M, which suppresses the storing of merge informations.
By default a brief summary of all extracted records is printed, unless
option N is specified. If the user wishes to write the
extracted records also on an FZ file he should specify the option X,
but note that the appropriated FZ calls should have previously been
issued before calling HDBEXTR.
CALL HDBEXTR (PATHI,PATHO,KEYS,CHSDIR,NSECD,CHOPT,IRC*)
ISEL are ignored.
PATHO+10