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?
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.
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.