Kbase 15884: How to programmatically dump and load database definitions (.df's) and data (.d's) files using Data
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  02/02/2011 |
|
Status: Verified
GOAL:
How to programmatically dump and load database definitions (.df's) and data (.d's) files using Data Administration routines ?
GOAL:
How to load a .df file without going through dictionary?
GOAL:
How to use prodict/dump_d.p, prodict/dump_df.p, prodict/load_d.p, prodict/load_df.p?
GOAL:
How to dump and load tables from ABL code ?
GOAL:
How to dump the data definition outside the dictionary?
GOAL:
Sample code to dump and load .df and .d with Data Dictionary routines
FACT(s) (Environment):
Progress 9.x
OpenEdge 10.x
All Supported Operating Systems
FIX:
The routine that loads the dictionary is called load_df.p. It is located in the prodict directory and must be called with 1 token.
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 */
Parameters required by the programs are documented at the top of each program.
The source code of the Data Dictionary routines to dump/load data and definitions are located in dlc/src/prodict.
Before using these code samples the procedure library named 'prodict.pl' must be extracted following these steps:
1) Make sure the DLC/bin directory is in the path.
2) Default to the SRC directory
3) Run the command extractpl prodict.pl
4) Run the command extractpl adecomm.pl
This will create a prodict and an adecomm directory with these files.
Progress does not provide support for the modification and/or use of these modules outside of the Data Dictionary.