batch method to delete data from multiple databases
Mike Schwartz
mschw at athenet.net
Fri Jan 8 09:44:01 PST 2016
> (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
More information about the Filepro-list
mailing list