Ok, i know what you mean now:
First of all you need to add the src directory from your progress installation to your propath.
Something like this will do it (obviously edit the path to where you installed progress)
Code:
ASSIGN propath = propath + ",c:\dlc\src".
Then, you will need some kind of screen to select the databases you want create incrementals between. I'll leave that up to you (its no fun if you get the whole answer
). But the following will show you all the databases you have connected
Code:
DEFINE VARIABLE i$db AS INTEGER NO-UNDO.
DO i$db = 1 TO NUM-DBS:
DISP LDBNAME(i$db).
END.
Then here's the code to actually produce an incremental df:
Code:
[b][i]do-incremental.p[/b][/i]
[size=1][size=2] {prodict\dictvar.i "NEW"}[/size]
[size=2] {prodict\user\uservar.i "NEW"}[/size]
[size=2] {prodict\user\userhue.i "NEW"}[/size]
[size=2] FIND DICTDB2._db[/size]
[size=2] NO-LOCK NO-ERROR.[/size]
[size=2] ASSIGN user_env[2] = "incremental.df" /* df file name */[/size]
[size=2] user_env[5] = "iso8859-1" /* code page */[/size]
[size=2] drec_db = RECID(DICTDB2._db).[/size]
[size=2] RUN prodict\dump\_dmpincr.p.[/size]
[/size]
You will need to compile this with either a database connected with a logical name of DICTDB2 or an alias set up called DICTDB2 in your environment. Then you can run it with the following to produce your incremental
Code:
[size=1][size=2] CREATE ALIAS DICTDB2 FOR DATABASE test.[/size]
[size=2] CREATE ALIAS DICTDB FOR DATABASE sports.[/size]
[size=2] RUN do-incremental.[/size]
[size=2] DELETE ALIAS DICTDB.[/size]
[size=2] DELETE ALIAS DICTDB2[/size]
[/size]
This example would create you an incremental df file which could be applied to test to give it the same schema as sports.
Hope this helps
Originally posted by DDM
Sorry I should have made my question clearer.
Basically I need to cater for both scenarios...... any code you have would also be helpful.
It would also be great if you could tell me which progress program you call to generate the incremental df's and what parameters you have to pass this prog.
Thanks