Functions and stored procedures
The i2 Analyze deletion-by-rule functions depend upon a set of standard functions and stored procedures. You can use these routines to manage deletion rules and create deletion jobs.
The available functions and procedures are described below. All parameters are mandatory.
Note: DB2 and SQL Server use stored procedures that you execute with CALL or EXEC. PostgreSQL uses functions that you execute with SELECT.
IS_Public.Automate_Deletion_Rule
Parameters: RULE_NAME
Sets automated to Y for the named rule to be included in the scheduled automatic creation of deletion jobs.
Deletion-by-rule jobs are placed in the queue of deletion jobs to be run in sequence.
IS_Public.Create_Deletion_Rule
Parameters: RULE_NAME, VIEW_NAME, CONDITIONS
Converts the SQL conditions and named view to a rule that is ready for deletion job creation.
CAUTION: When a job is created from a rule that has an empty value for the conditions parameter, it deletes every record in the view.
IS_Public.Delete_Deletion_Rule
Parameters: RULE_NAME
Deletes the named rule.
IS_Public.Disable_Deletion_Rule
Parameters: RULE_NAME
Sets the automated parameter to N for the rule to be excluded from the scheduled automatic creation of deletion jobs.
The rule can be used for manual deletion only.
IS_Public.Create_Deletion_Job
Parameters: RULE_NAME
Creates a deletion job that is based on the named rule. This procedure can be run for the rule when the value of automated is Y or N. The deletion-by-rule job is placed in the queue of deletion jobs to be run.
IS_Public.Update_Deletion_Rule
Parameters: RULE_NAME, VIEW_NAME, CONDITIONS
Updates the named rule by revising the original VIEW_NAME or CONDITIONS.
IS_Public.Update_Deletion_Schedule (Not available with PostgreSQL)
Parameters: SCHEDULE
Updates the job creation schedule. For more information about the schedule format, see Changing the automated job creation schedule.
IS_Public.Validate_Deletion_Rule
Parameters: RULE_NAME
Reports on the SQL Results tab any SQL errors that are found associated with the SQL conditions of the named rule.
The report contains results by MESSAGE, SQLCODE, and SQLSTATE values.