batch method to delete data from multiple databases
Richard Veith
Richard.Veith at SMRresearch.com
Fri Jan 8 11:14:00 PST 2016
Thanks very much to both Mike and Jose for pointing me in the right
direction. After some testing, I think "dprodir testname -KA" is what I
want, since I am not trying to create a menu option, but rather a separate
DOS batch file with a dprodir line for each database that needs to be
cleaned out.
Thanks again,
Rich
-----Original Message-----
From: Filepro-list
[mailto:filepro-list-bounces+richard.veith=smrresearch.com at lists.celestial.c
om] On Behalf Of Mike Schwartz via Filepro-list
Sent: Friday, January 08, 2016 12:44 PM
To: filepro-list at lists.celestial.com
Subject: RE: batch method to delete data from multiple databases
> (e.g., menu choices "?", "D", "L" and "Yes"). Is there a way to create a
> batch script that would run through all the relevant databases and
> delete
all
> "key and data" from each one?
>
> Thanks,
>
> Rich
Yes, the filePro DDIR command has options to delete the key and data
from an individual filepro database. You can even delete the data in a
qualifier, leaving the main key and data intact.
In a filePro menu, you could write a batch script that deletes the key
and data segments from several filePro databases at the same time, something
like this Unix script:
FP="/u/appl"
$FP/fp/ddir LMpost -KA -H "DELETING LMpost Last month's posted DATA"
$FP/fp/ddir SmanSpiff -KA -H "DELETING Last Month's spiff DATA"
$FP/fp/ddir AGT_PAY -KA -H "DELETING Last Month's AGENTS PAYABLE DATA"
NOTES:
1) Read up on the DDIR command options *CAREFULLY* in the filepro help
files and in STNs filepro bible *before* you try using DDIR.
2) Test your scripts *ONLY* after you have done a full filePro database
backup and when nobody else is accessing the databases.
3) Put some protection, like a password or other block, on the menu
that runs this script, so that nobody accidentally runs it in the middle of
the month!
4) Ask questions in this group *BEFORE* you try to run your script.
Mike Schwartz
_______________________________________________
Filepro-list mailing list
Filepro-list at lists.celestial.com
Subscribe/Unsubscribe/Subscription Changes
http://mailman.celestial.com/mailman/listinfo/filepro-list
More information about the Filepro-list
mailing list