fhg
Volume 10, Number 17 -- May 26, 2010

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.

  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


Sponsored By
BOTZ & ASSOCIATES, INC.

~ ASK PAT ~
Free Security Advice from Patrick Botz

                                                 Need advice you can trust on security audits,
                                                 PCI, HIPAA or SOX requirements, 3rd party
                                                 software, rational password management,
                                                 public authority or Security Level 40?

                                                 Spend an hour with Patrick Botz - FREE -
                                                 and get actionable info and tips
to get you
                                                 started. Custom, 100% independent advice

                                                 from the guy who helped architect Power
                                                 Systems / IBM i security.

                                                 Click to set up your free session with Pat.
                                                 World-class security expertise is no longer just
                                                 for the big guys!


Senior Technical Editor: Ted Holt
Technical Editor: Joe Hertvik
Contributing Technical Editors: Erwin Earley, Brian Kelly, Michael Sansoterra
Publisher and Advertising Director: Jenny Thomas
Advertising Sales Representative: Kim Reed
Contact the Editors: To contact anyone on the IT Jungle Team
Go to our contacts page and send us a message.

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


 
The Four Hundred
Power7 Blades Plus i Versus X64 Blades Plus Windows

Transitions Push Systems and Technology Group into the Red

AS/400 LUG Shares Chief i Architect's "Why i?" Arguments

Creativity Is the New Business Kool-Aid, IBM CEO Study Finds

IBM Emphasizes 'Deeper Skills' in New Business Partner Program

Four Hundred Stuff
Security and Auditing Breakthrough Gives Cilasoft Compliance Advantage

DBU Now Accessible Over the Web

PowerTech Delivers Object-Based Control Over Exit Points

IBM Considers Offering Trials of RPG OA

Databorough Targets CA 2E Apps for Migration

Four Hundred Monitor
Four Hundred Monitor's
Full iSeries Events Calendar

System i PTF Guide
May 22, 2010: Volume 12, Number 21

May 15, 2010: Volume 12, Number 20

May 8, 2010: Volume 12, Number 19

May 1, 2010: Volume 12, Number 18

April 24, 2010: Volume 12, Number 17

April 17, 2010: Volume 12, Number 16

TPM at The Register
Cray-1 resurfaces in pieces on eBay

Novell puts Identity Management into beta

BMC reveals 'free money' mainframe and DB2 tools

Oracle shows off M9000s for data warehousing

Server rebound, Perot services boost Dell

NOAA goes to Cray for climate super

Cisco shells out $99m for CoreOptics

Oracle punts first VirtualBox x64 hypervisor

Novell seeks rich suitors

Oracle sneaks out carrier grade Sparc blade, Xeon rack

SUSE Linux 11 gets first service pack

IBM punts commercial Hadoop distro

THIS ISSUE SPONSORED BY:

WorksRight Software
SEQUEL Software
Botz & Associates, Inc.


Printer Friendly Version


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

Four Hundred Guru

BACK ISSUES




 
Subscription Information:
You can unsubscribe, change your email address, or sign up for any of IT Jungle's free e-newsletters through our Web site at http://www.itjungle.com/sub/subscribe.html.

Copyright © 1996-2010 Guild Companies, Inc. All Rights Reserved.
Guild Companies, Inc., 50 Park Terrace East, Suite 8F, New York, NY 10034

Privacy Statement