IBM i Global

 View Only

 Date of last use on objects with DSPOBJD

Miguel Peralta's profile image
Miguel Peralta posted 02/05/26 02:59 PM

I ran a DSPOBJD to check the Date of last use on objects in the same library. I noticed that some had a date and others did not. Could it be that they were never used after being created (obviously) or that they haven't been used since their last restoration? Is there another possible explanation?

Anna Niederschulte's profile image
Anna Niederschulte

Miguel,

Yes the likely cause of the field being blank could be they haven't been used since they were restored or created. If you look at the change date/time field it should match the restore date/time a couple of pages down. If those 2 are the same and there isn't a last used date that likely points to the object not being used since it was restored from another system or from an OS upgrade.

Todd Stewart's profile image
Todd Stewart IBM Champion

This document explains all the ways the last used date is changed or reset. -TMS

https://www.ibm.com/docs/en/i/7.4.0?topic=libraries-detecting-unused-objects-system

Paul Nicolay's profile image
Paul Nicolay

There's also a field number of days used... that will probably be zero for those without a date (ie. they've not been used)

Marius le Roux's profile image
Marius le Roux IBM Champion

Miguel, 

They can also be "zero" because of an upgrade : see : https://www.itjungle.com/2010/05/26/fhg052610-story03/

And this would be the "offical reason" from IBM why the restore will not change dates : https://www.ibm.com/support/pages/object-last-used-date-not-updated-during-restore

lastly, check these two queries out from Bob Cozzi, they are great to find old objects on the system : 

https://www.itjungle.com/2023/07/10/guru-object-usage-statistics/

https://www.itjungle.com/2023/05/15/guru-find-unused-objects-on-ibm-i-using-sql/

Have a look at those to help you save a few minutes with the analysis. 

Marius