automated .df and .d dump

Posted by Quintin on 05-Aug-2015 07:11

Good day everyone

 

I’m in a position where I would like to dump a couple of databases .df's and one table of a certain db... All this I would like to do with a .sh script.  I've been on the knowledge base and found a couple of things but getting it to work is my hiccup.

I've extracted the prodict.pl under $DLC/src here I have located the $DLC/src/prodict/dump_df.p and dump_d.p programs.  I connected to a database, set my PROPATH to point to the correct directories where the .p's and .i's are located for this program to run, opened the dump_df.p program and ran it... and I end up getting a "Mismatched number of parameters passed to routine (3234)" error... (We do have a developer’s license so I can’t see why I would have to re-compile these programs).


Can’t see what it is that I’m missing... Is there someone who's done this in the past or who might be able to help me successfully dumping a df and a .d via a .sh script

Best regards

 

Posted by cverbiest on 05-Aug-2015 07:22

Check out the PCT project, it allows you to use ant  to dump & load , compile, ...  see github.com/.../pct .

Dump df has input parameter

run prodict/dump_df("ALL", "database.df", ?).

Posted by Dileep Dasa on 05-Aug-2015 07:20

dump_df.p needs 3 INPUT parameters: comma seperated list of table names to dump, file name and codepage. You can call dump_df.p this way for example:

RUN prodict/dump_df.p("t1,t2","test1.df",?).

If you want to dump definitions of all tables in the database, you can pass "ALL" as first parameter value instead of comma separated list of tables


All Replies

Posted by Dileep Dasa on 05-Aug-2015 07:20

dump_df.p needs 3 INPUT parameters: comma seperated list of table names to dump, file name and codepage. You can call dump_df.p this way for example:

RUN prodict/dump_df.p("t1,t2","test1.df",?).

If you want to dump definitions of all tables in the database, you can pass "ALL" as first parameter value instead of comma separated list of tables


Posted by cverbiest on 05-Aug-2015 07:22

Check out the PCT project, it allows you to use ant  to dump & load , compile, ...  see github.com/.../pct .

Dump df has input parameter

run prodict/dump_df("ALL", "database.df", ?).

Posted by George Potemkin on 05-Aug-2015 08:33

> I've extracted the prodict.pl under $DLC/src here I have located the $DLC/src/prodict/dump_df.p and dump_d.p programs.  I connected to a database, set my PROPATH to point to the correct directories where the .p's and .i's are located for this program to run

You don't need to do all of that.

Just run:

run prodict/dump_df.p("ALL", ldbname("DICTDB") + ".df", ?).

Posted by Quintin on 05-Aug-2015 08:39

Awesome!!!

Thanks gents.... I created a .sh calling (_progress -df "df-file"), in the df i'm connecting to a db of my choice and calling my .p , in my .p i set my PROPATH's and call the command to dump the df!! Now to fine tune it to work on multiple db's.

Thanks a mill

Hope the same works for dumping a .d with dump_d.p?

Regards

Posted by TheMadDBA on 05-Aug-2015 10:47

Dumping .d files works the same way.

Input 1: comma delimited list of tables or ALL

Input 2: directory to dump the files

Input 3: codepage

This thread is closed