What does Plan Analyzer use to determine the latest package
search cancel

What does Plan Analyzer use to determine the latest package

book

Article ID: 101547

calendar_today

Updated On:

Products

Plan Analyzer for DB2 for z/OS

Issue/Introduction

What does Plan Analyzer for Db2 for z/OS (PPA) use to determine the latest package. 

Resolution

PPA logic that that determines which package version is the latest version among multiple versions in the catalog, uses the precompile time as
the primary basis to make that determination. For many package types, this is not a useful value in determining which package version is the LATEST one.
There is a default value of '0001-01-01-00.00.000000' being placed into the PCTIMESTAMP column of SYSIBM.SYSPACKAGE for packages that are
created from non-standard sources (i.e. not from BIND PACKAGE). When PPA encounters the default PCTIMESTAMP value, PPA uses its sort logic that
checks for PCTIMESTAMP = '0001-01-01-00.00.000000' in the fetched row, and if detected, PPA uses the TIMESTAMP value to determine if the row is
more recent than the prior row. This additional logic yields the LATEST row in a "hybrid" approach - PCTIMESTAMP 1st, TIMESTAMP 2nd.