pears.DBCleanupOldJRlog
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
Original SQL
COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."DBCleanupOldJRlog" IS {CREATE FUNCTION DBCleanupOldJRlog /* Application Maintained Function / Procedure - DO NOT EDIT*/ (IN age INTEGER, IN countordo CHAR(1)) RETURNS INTEGER BEGIN DECLARE @RC INTEGER; SELECT COUNT(*) INTO @RC FROM iqxjobrunnerlog WHERE completiontime <= CURRENT date-age; IF countordo = 'C' THEN RETURN @RC END IF; DELETE FROM iqxjobrunnerlog WHERE completiontime <= CURRENT date-age; CALL AuditLog('CLEANUP',NULL,string(@RC,' Old Jobrunner Logs deleted ',age,' days old'),NULL,NULL); RETURN @RC; END }