Kbase P103488: How to dump schema definitions without using Data Dictionary or Data Admin Tool
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/03/2010 |
|
Status: Verified
GOAL:
How can I dump schema definitions without using Data Dictionary or Data Admin Tool
GOAL:
How can I dump schema from a procedure within my application
GOAL:
Can I write a script/bat file to dump schema
FACT(s) (Environment):
All Supported Operating Systems
Progress 8.x
Progress 9.x
OpenEdge 10.x
FIX:
Yes, there is a procedure contained in the Progress product which can be called that is an API into the standard dump utility. The procedure is prodict/dump_df.p It takes 3 INPUT parameters: file name(s) for the tables to be dumped, the name of the definition file to create, and the code page. The format for the parameters is as follows:
file name : "ALL" or "<file-name> [,<filename>] ..."
df file name : Name of file to dump to
code-page : ?, "", "<code-page>"
Code-page - support:
code-page = ? :cpstream = UNDEFINED*
code-page = "" : cpstream = (SESSION:STREAM)
code-page = "<code-page>" : cpstream will either be SESSION:STREAM or UNDEFINED*
*Undefined code page is a special code page which tells Progress not to do any conversion when reading or writing data. As long as there are only ASCII characters this is not a problem but if there are any non-ASCII characters, you run the risk of corrupting them.
Syntax Examples:
Dump all tables:
RUN prodict/dump_df.p (INPUT ?ALL?,
INPUT ?sports.df?,
INPUT ?).
Dump two tables
RUN prodict/dump_df.p (INPUT ?customer,order?,
INPUT ?table.df?,
INPUT ?ibm850?).