﻿--  category:  IBM i Services for BRMS
--  description:  Application - BRMS Maintenance Policy Procedures
--  minvrm: V7R3M0
--  Requires BRMS PTFs - 7.5 SI82234, 7.4 SI82233, 7.3 SI82232
--  last updated: 3/15/2023
--
-- CALL QUSRBRM.CHANGE_MAINTENANCE_POLICY(
--      EXPIRE_MEDIA=> expire-media,
--      EXPIRE_PARTIAL_SET=> expire-partial-set,
--      REMOVE_MEDIA_INFO=> remove-media-info,
--      RETAIN_OBJECT_DETAIL=> retain-object-detail,
--      RETAIN_LINK_DETAIL=> retain-link-detail,
--      RETAIN_SPLF_DETAIL=> retain-splf-detail,
--      RETAIN_FOLDER_DETAIL=> retain-folder-detail,
--      REMOVE_MIGRATION_INFO=> remove-migration-info,
--      RUN_MOVE_POLICIES=> run-move-policies,
--      LOG_ENTRIES_DAYS=> log-entries-days,
--      RUN_CLEANUP=> run-cleanup,
--      RETRIEVE_VOLUME_STATS=> retrieve-volume-stats,
--      MEDIA_AUDIT=> media-audit,
--      CHANGE_JOURNALS=> change-journals,
--      EXPIRED_MEDIA_REPORT=> expired-media-report,
--      VERSION_REPORT=> version-report,
--      MEDIA_INFO_REPORT=> media-info-report,
--      RECOVERY_ACTIVITIES_REPORT=> recovery-activities-report,
--      SYSTEM_RECOVERY_REPORT=> system-recovery-report,
--      SAVE_EXCEPTIONS_REPORT=> save-exceptions-report,
--      SYSTEM_INFO_REPORT=> system-info-report)
--
-- Example: Set maintenance option to expire media
CALL QUSRBRM.CHANGE_MAINTENANCE_POLICY(
    EXPIRE_MEDIA => 'YES'
);

--
-- Example: Set maintenance option to not run clean up
CALL QUSRBRM.CHANGE_MAINTENANCE_POLICY(
    RUN_CLEANUP => 'NO'
);

--
-- Example: Set maintenance to delete log entries over 90 days old:
CALL QUSRBRM.CHANGE_MAINTENANCE_POLICY(
    LOG_ENTRIES_DAYS => 90
);

--
-- Procedure to reset maintenance policy back to the original BRMS system defaults
CALL QUSRBRM.RESET_MAINTENANCE_POLICY_DEFAULTS ();
