|
Hey! What Happened To My Last Used Dates
Published: 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.
- 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.
- 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
|