IBM Datacap, Version 8.1            

Sample AutoDelete ruleset

The sample AutoDelete ruleset removes all of the batches that were completed more than five days ago.

This ruleset uses a separate IBM® Datacap Taskmaster Capture application named BackupApp as an archive repository for the batches and database records that are removed from the production application. APT is the application that is used in this example.

Each of the actions in the sample AutoDelete ruleset is described in the following table.

For more information about NENU actions, see the embedded help in Datacap Studio. To access the embedded help, select an action in the Actions Library tab and click information.

AutoDelete Rule1 Function1

SetApplication("APT")

; Set application to APT
SetUser("admin") ; Set user name
SetPassword("admin") ; Set password

It is best not to store User or Password values in the application without encryption. Use Smart parameters, which are encrypted.

SetStation("1") ; Set station
SetupOpenApplication("APT") ; Connect to APT application
QuerySetStatus("Job done") ; Locate batches with status "Job done"
QuerySetAge("432000", False) ; Locate batches completed more than 5 days ago, age is specified in seconds
ProcessRunSQLQuery() ; Run query
ProcessMoveBatches("G:\BackupApp\batches") ; Move batch folders to back up location
ProcessMoveDBRecords("ICRC_APT", " ", " ", " ", True, "admin", "admin", "1", True) ; Move database records to back up application database


Feedback

Last updated: November 2013
dcane003.htm

© Copyright IBM Corporation 2013.