InfoSphere Optim

InfoSphere Optim

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  Identifying and Deleting Expired Archive Files on z/OS

    Posted Wed August 15, 2018 11:54 AM
    ​Wondering if any users have an automated process for identifying expired Optim archive files and then deleting them from the Optim directory and the files themselves?

    The distributed version of Optim allows for Storage Profiles that then get cleaned up automatically by an Optim Server process once they expire. However, the mainframe version of Optim doesn't have this. You can set a retention period for an archive files via the PARAMETERS associated with the Access Definition, however, Optim doesn't flag these files after the expiration date is met.

    We would like to use an automated process for identifying expired files and purging them. The Optim Directory maintenance commands seem really limited here and even using them to find files that are expired (meaning older than today's date) doesn't seem to be a command option.

    I have tried using the 'EXPIRE' parameter on the Directory Maintenance to get an archive listing of expired files and it doesn't seem to work as expected since it always returns a listing of every archive file in the Optim Directory, regardless of whether it's expired or not and regardless of the timeframe/date I enter.

    If anyone has some example commands and parameters from the Optim SYSIN DD for identifying and deleting expired files (older than today), I'd greatly appreciate seeing it.

    ------------------------------
    Keith Tidball
    Progressive Insurance
    ------------------------------

    #InfoSphereOptim
    #Optim


  • 2.  RE: Identifying and Deleting Expired Archive Files on z/OS

    Posted Fri August 17, 2018 12:53 PM
    Edited by System Admin Fri January 20, 2023 04:16 PM
    ​Hello Keith,

    You should be able to use

    DIR TYPE ARC NAME % EXPIRE(0 DAYS) 

    to identify all expired ARCHIVE files. And then you could use

    DELETE TYPE ARC NAME XXXX.XXXXX.% EXPIRE(0 DAYS) 

    to delete the expired ARCHIVEs from the Optim directory. You may want to add FILE YES to also delete the associated physical ARCHIVE file. Note that FILE NO is the default.

    Please open a PMR if this is not working for you as it should.

    ------------------------------
    Greg Czaja
    Optim for z/OS Development
    Unicom Systems Inc.
    ------------------------------



  • 3.  RE: Identifying and Deleting Expired Archive Files on z/OS

    Posted Wed August 22, 2018 01:44 PM
    ​Thank you, Greg! Based upon the existing documentation, I'd *never* have determined that is the proper syntax, so your example is appreciated. We'll give this a try and see if it works.

    -Keith

    ------------------------------
    Keith Tidball
    Progressive Insurance
    ------------------------------