A challenge facing many of us is how to find out when a program was last executed. There are expensive product out there to help us solve this problem, but many installations does not use those products and if they do the developers have not been told about it. Fortunately the DB2 team has decided to help us.
As soon as your installation has migrated to DB2 10 a column called LASTUSED on SYSIBM.SYSPACKAGE will be updated with the date of the last execution of a SQL statement in the corresponding program. In order to determine the last execution date of your program using LASTUSED you must be sure that your program has executed a SQL statement.
If the DB2 subsystem you are using does not seem to update LASTUSED you must remember to check all versions of the package belonging to your program. If none of the versions has a correctly updated LASTUSED value and you know that the DB2 version is 10 for the subsystem you are using, the reason is probably that the systems programmer installing DB2 10 has not enabled the update of LASTUSED. Tell the systems programmer how brilliant it is to see when a program last executed a SQL statement and ask him or her to set the DSNZPARM parameter DISABLE_EDMRTS to NO.