incremental df's

bendaluz2

Member
What do you mean?

Do you want to produce incrementals for

a->b and c->d at the same time

or do you mean

a->b and a->c and a->d at the same time?

either way, the answer is no with the standard tools, but I wrote a util to do the second one a couple of years ago. you should be able to knock one up fairly easily in an hour or so. Though, unless you are going to do this for a lot (more than 5 i would say) of databases, there isnt much point really

Originally posted by DDM
Is there any way to create incremental df's for more than one database at a time ?
 

DDM

New Member
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



Originally posted by bendaluz2
What do you mean?

Do you want to produce incrementals for

a->b and c->d at the same time

or do you mean

a->b and a->c and a->d at the same time?

either way, the answer is no with the standard tools, but I wrote a util to do the second one a couple of years ago. you should be able to knock one up fairly easily in an hour or so. Though, unless you are going to do this for a lot (more than 5 i would say) of databases, there isnt much point really
 

bendaluz2

Member
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
 

DDM

New Member
Thanks for the information it is very helpful.
Once we have created the incremental DF is there any way to automatically apply the DF to a database ?

I.E. Schedule it over night - when no users are using the database.


Originally posted by bendaluz2
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 :)
 
Top