MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » January 2014

RE: when does OS/400 or IBM i reset the "last used" date of an object?



fixed

Last Used Date - Help

The date the object was used last. The date is only updated once per
day (the first time an object is used in a day). This field is blank if
the object was not used or usage data is not updated for this object
type. For more details on usage information, see "Objects and
libraries" in the CL topic collection in the Programming category in the
i5/OS Information Center at http://www.ibm.com/systems/i/infocenter/.

The last used date for a database file is the last used date of the file
member with the most current last used date.

When an object that already exists on the system is restored, the last
used date comes from the object on the system. If it does not already
exist when restored, the date is blank. Objects that are deleted and
recreated during the restore operation, lose the last used date.

Below is from Info Center

Detecting unused objects on the system


Information provided in the object description can help you detect and manage unused objects on the system.


To detect an unused object, look at both the last-used date and the last-changed date. Change commands do not update the last-used date unless the commands cause the object to be deleted and created again, or the change operation causes the object to be read as a part of the change.
*Date and time of last change *When an object is created or changed, the system time stamps the object, indicating the date and time the change occurred.

*Date of last use *The date of last use is only updated once per day (the first time an object is used in a day). The system date is used.
*An unsuccessful attempt to use an object does not update the last used date. For example, if a user tries to use an object for which the user is not authorized, the date of last use does not change.
*The date of last use is blank for new objects.
*When an object that already exists on the system is restored, the date of last use comes from the object on the system. If it does not already exist when restored, the date is blank.
*Objects that are deleted and re-created during the restore operation lose the date of last use.
*The last used date for a database file is not updated when the number of members in the file is zero. For example, if you use the Create Duplicate Object (CRTDUPOBJ) to copy objects and there are no members in the database file, the last used date is not updated.
*The last used date for a database file is the last used date of the file member with the most current last used date.
*For logical files, the last used date is the last time a logical member (or cursor) was used.
*For physical files, the last used date is the last time the data in the data space was used through a physical or logical access.
*Objects that are deleted and re-created during the rename operation lose the date of last use.

*Date of last activity*Date of last activity is the last date for which data transfer, session or conversation establishment, or use of the hardware associated with a device description occurred.
*Because the date of last use is updated when a device, controller status, or both go beyond vary-on pending, the date of last use does not accurately reflect the use of the configuration description. For example, if you set virtual devices, controllers, or both to ONLINE(*YES), although no data transfer or communications are established on the device, the date of last use is updated when an initial program load (IPL) is processing and the device is varied on. However, date of last activity is not updated, which can reflect the accurate use of the configuration description.


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Mark S Waterbury
Sent: Monday, January 27, 2014 6:48 PM
To: Midrange Systems Technical Discussion
Subject: when does OS/400 or IBM i reset the "last used" date of an object?

All:

One of my customers ran into this, and I am at a loss to explain it (so far).

On their production LPAR, they ran a DSPOBJD of all objects in one production library to an *OUTFILE some time on Friday.

Now, looking at the data in that outfile today, they notice that many of those objects had the "last used" date containing blanks -- e.g. not used since it was last "reset".

Yet today, they also noticed that if they now issue DSPOBJD against any of those same objects that had a blank "last used" date, on the same production LPAR, and specify DETAIL(*FULL), they tell me they now see a "last used" date on many (but not all?) of those objects -- and the last used date shown is "20140124" (last Friday)...

What can cause this?

I know, for example, that restoring objects from a previous save, (from tape or save file), resets the "last used" date to blanks.

But, what other commands or actions will set the "last used" date?

I know that CALLing a *PGM will set its "last used" date to the current date, as will OPENing a *FILE ...

Are there any other commands that could have "touched" many objects in this one library, causing many of them to have their "last used" date set?

Thanks in advance for any ideas ...

Mark S. Waterbury

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact