• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Hey! What Happened To My Last Used Dates

    May 26, 2010 Hey, Joe

    After we upgraded our production system to new Power i hardware, the Last used date on all our system objects was reset to zeros. While this isn’t a major problem, it does mean that we are no longer able to identify obsolete objects and files on our system. If we can’t identify them, then we can’t remove them. Is there any way to get this information back?

    –Bert

    Thanks, Bert. Unfortunately, if you migrated your existing production partition to a new system and restored all the objects to that system, all your objects’ Last used dates are gone. Here’s how I understand this process works in restoration and migration scenarios.

    You can use the Display Object Description (DSPOBJD) command to view the Object Attributes for any particular object. Object attributes include object creation information, change and usage information, storage information, and save and restore information for the object. If I wanted to view the Object Attributes for a file called JOE in library HERTVIK, I would run the following DSPOBJD command so that it displays the service attributes for the object.

    DSPOBJD OBJ(HERTVIK/JOE) OBJTYPE(*FILE) DETAIL(*FULL)
    

    When you save objects with any of the save commands, the Last used date and the Days used count are not saved with the objects. However, the object’s Creation information, which includes the Creation date and time values, the Created by user value, the system the object was created on, and the Object domain value, is saved.

    When you restore the object, the Last used date and Days used count may or may not be retained depending on the type of restore you’re doing. Here are two different scenarios where these fields will be treated differently depending on how you are restoring the object.

    1. If you are restoring the object over an existing object on a system, the Last used date and the Days used count will not be reset. They will remain at the values they were at before the restore occurred. Because these values weren’t saved with the rest of the object, the object retains the Last used date and Days used count values it had before the restore. The Change date/time value for the object, however, will be set to the date and the time that the object is restored. This is understandable because a restore changes the object as it is restored over an existing object.
    2. If you are restoring an object that does not currently exist on the system, the Last used date will be reset to a blank date and the object’s Days used count will be reset to zeroes. This is because this information was not saved with the object. Since you are restoring a new object to the system (as opposed to restoring the object over an existing object), there is no Last used date or Days used count to assign to the object. This holds true whether you are restoring a new object to an existing system or whether you are migrating all objects from one system to another system. The objects’ Changed date/time value will be reset to the current date and time, the same as it is when you restore an existing object.

    So this is probably what happened on your system. When you migrated your existing objects to new hardware, it blanked out your Last used dates and reset the Days used count fields to zero.

    However, if you haven’t wiped the disk drives on your old machine yet, there may still be a way to retain the Last used dates and the Days used counts for your pre-migration data. If your old machine is still accessible, you can save the object information from your pre-migration files to tape and transfer that information to the new machine. Here’s how I would approach doing this.

    1. On the old machine, run the following Display Object Description command.

    DSPOBJD OBJ(*ALL/*ALL) OBJTYPE(*ALL) DETAIL(*FULL) 
    OUTPUT(*OUTFILE) OUTFILE(LIB_NAME/DSPOBJD)
    

    The resulting DSPOBJD file will contain the object descriptions for all objects on your pre-migration machine, including the Last used date and Days used count for each object.

    2. Transfer the DSPOBJD file you just created to your new partition. When you want to check the Last used dates and Days used counts for objects where these fields were reset, you can reference that file.

    If it’s no longer possible to accessible your pre-migration files, then unfortunately you’ll have to live with the blank Last used dates and the zero Days used counts.

    HTH

    –Joe



                         Post this story to del.icio.us
                   Post this story to Digg
        Post this story to Slashdot

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    Raz-Lee Security

    Start your Road to Zero Trust!

    Firewall Network security, controlling Exit Points, Open DB’s and SSH. Rule Wizards and graphical BI.

    Request Demo

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Sponsored Links

    IBS:  Free e-book: The Six Margin Killers in Wholesale Distribution
    WorksRight Software:  ZIP codes, area codes, Canadian postal codes, CASS certification, and more
    COMMON:  Join us at the Fall 2010 Conference & Expo, Oct. 4 - 6, in San Antonio, Texas

    IT Jungle Store Top Book Picks

    Easy Steps to Internet Programming for AS/400, iSeries, and System i: List Price, $49.95
    The iSeries Express Web Implementer's Guide: List Price, $49.95
    The System i RPG & RPG IV Tutorial and Lab Exercises: List Price, $59.95
    The System i Pocket RPG & RPG IV Guide: List Price, $69.95
    The iSeries Pocket Database Guide: List Price, $59.00
    The iSeries Pocket SQL Guide: List Price, $59.00
    The iSeries Pocket Query Guide: List Price, $49.00
    The iSeries Pocket WebFacing Primer: List Price, $39.00
    Migrating to WebSphere Express for iSeries: List Price, $49.00
    Getting Started With WebSphere Development Studio Client for iSeries: List Price, $89.00
    Getting Started with WebSphere Express for iSeries: List Price, $49.00
    Can the AS/400 Survive IBM?: List Price, $49.00
    Chip Wars: List Price, $29.95

    Saudi Distributor Taps VAI for Logistics Improvement nuBridges Eases i/OS Integration for Tokenized Data

    Leave a Reply Cancel reply

Volume 10, Number 17 -- May 26, 2010
THIS ISSUE SPONSORED BY:

WorksRight Software
SEQUEL Software
Botz & Associates, Inc.

Table of Contents

  • Five Steps To Monitoring Your Server Log on IBM i
  • Distinctly Speeding Up DISTINCT
  • Hey! What Happened To My Last Used Dates

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Liam Allan Shares What’s Coming Next With Code For IBM i
  • From Stable To Scalable: Visual LANSA 16 Powers IBM i Growth – Launching July 8
  • VS Code Will Be The Heart Of The Modern IBM i Platform
  • The AS/400: A 37-Year-Old Dog That Loves To Learn New Tricks
  • IBM i PTF Guide, Volume 27, Number 25
  • Meet The Next Gen Of IBMers Helping To Build IBM i
  • Looks Like IBM Is Building A Linux-Like PASE For IBM i After All
  • Will Independent IBM i Clouds Survive PowerVS?
  • Now, IBM Is Jacking Up Hardware Maintenance Prices
  • IBM i PTF Guide, Volume 27, Number 24

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle