Consultor Eletrônico



Kbase 30030: How to programmatically dump and load database definitions (.df's) and data (.d's) files using Data Administration routines?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
Solution ID: P30

GOAL:

How to programmatically dump and load database definitions (.df's) and data (.d's) files using Data Administration routines?

FIX:

Before using the following code samples that procedure library named 'prodict.pl' must be extracted.

These samples program consider the case of multiples databases connected into the PROGRESS session, by setting the alias DICTDB to point to the desired database. Delete of the ALIAS at the end is only required if dump/load of other databases follow the code.

/* dump.p */

CREATE ALIAS DICTDB FOR DATABASE sports.
DISPLAY LDBNAME("DICTDB").
RUN prodict/dump_df.p ("ALL","sports.df","").
RUN prodict/dump_d.p ("ALL",".","").
DELETE ALIAS DICTDB. /* Optional */

/* end of dump.p */

/* load.p */

CREATE ALIAS DICTDB FOR DATABASE sports.
DISPLAY LDBNAME("DICTDB").
RUN prodict/load_df.p ("sports.df").
RUN prodict/load_d.p ("ALL",".").
DELETE ALIAS DICTDB. /* Optional */

/* end of load.p */

The source code of the Data Dictionary routines to dump/load data and definitions are located in dlc/src/prodict.

Parameters required by the programs are documented at the top of each program.

NOTE: Progress does not provide support for the modification and/or use of these modules outside of the Data Dictionary.