Currently MODIFY STATISTICS utility does not support LISTDEF with PARTLEVEL and throws an error like in example:
LISTDEF DB2RK
INCLUDE TABLESPACE DS0HUZX.S0HU37P PARTLEVEL(20)
TEMPLATE COPYIC DSN(&SS..ICR.&DB..&TS..P&PA..&UQ.)
TEMPLATE RECSYS DSN(&SS..SRE.&DB..&TS..&UQ.)
DISP(NEW,DELETE,DELETE)
REORG TABLESPACE LIST DB2RK
LOG NO COPYDDN(COPYIC) SORTDATA NOSYSREC
DEADLINE CURRENT TIMESTAMP + 4 HOURS RETRY 6
RETRY_DELAY 120 MAXRO 25 LONGLOG DRAIN
DRAIN_WAIT 25 DELAY 90 TIMEOUT TERM
SHRLEVEL CHANGE
UNLDDN RECSYS SORTDEVT SYSDA KEEPDICTIONARY
RUNSTATS TABLESPACE LIST DB2RK TABLE(ALL)
SHRLEVEL CHANGE UPDATE ALL HISTORY ALL
STATCLGMEMSRT 4096
SORTDEVT SYSDA SORTNUM 16
MODIFY RECOVERY LIST DB2RK DELETE AGE 20
MODIFY STATISTICS LIST DB2RK DELETE ALL AGE 60
RC=08 and the message is:
DSNU050I 191 14:15:55.98 DSNUGUTC - MODIFY STATISTICS LIST DB2RK DELETE ALL AGE 60
DSNU1003I 191 14:15:55.99 DSNUGULM - INVALID LIST FOR MODIFY STATISTICS UTILITY
DSNU012I 191 14:15:56.00 DSNUGBAC - UTILITY EXECUTION TERMINATED, HIGHEST RETURN CODE=8
There is a need for various reasons for this utility to be standardized with other utilities to operate on partition level. Firstly, as per example above, it is impossible to execute standardized housekeeping syntax to run all required utilities for given partition in one execution. Combined as above is rendering an error.
Most important is fact, that vast majority and the biggest of the statistics history collection tables have and recognize partition of the object. There is a lot of applications that use the partitions over time and then switch to next partition per business period for example, business unit, time etc. As result, it is very common situation when some partitions are stable and do not need stats collection, while other parts needs to get runstats running every day as data changes, grows in it etc. With current design and lack of functionality, those stats only ever grow as it is not possible to trim old stats, for example month old for only currently used partition, not impacting historical stats collected for other partitions. Even though as mentioned, majority of biggest (column related) stats history tables are partion aware. Among others, for this reason those tables grow like crazy while they do not need to.
Dear Ryszard, We are pleased to inform you this idea has been delivered and is available in APAR PH63145.
Kind regards,
The Db2 for z/OS Development team