DSNUTILS to call RUNSTATS

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
nmacolin
Participant
Posts: 19
Joined: Mon Jun 16, 2008 6:01 pm

DSNUTILS to call RUNSTATS

Post by nmacolin »

Hi all,

Looking for a way to call RUNSTATS from DS v8.1 on DB2 v9.1.5.

Looking for some help in calling the DSNUTILS SP. There doesn't seem to a lot of information around on how to do this other than the standard IBM doc.

We have a DataStage application which loads data into the Target Tables. At the end of the process we would like to initiate a RUNSTATS on the new loaded data ( We also Drop and Recreate Indexes). We have many steps in the ETL and really need these indexes to be available and recognised by the DB2 Optimiser to make the Enrichment process which follows more efficient.

Since we are on Z/OS it's not possible to make the standard SQL call to do RUNSTATS (as would be the case for WIN or LUW). Instead we need to run this as a DB2 Utility. OK, that's fine so looking at how to make the call to DSNUTILS..

This is definitely possible as we are using TOAD for DB2 and can initiate the statement from TOAD. TOAD actually recognises the RUNSTATS statement and behind the scences creates the appropriate DSNUTILS statements for execution on DB2 Z/os. ( I can't see what it is actually sending to DB2 ... :-(

Here is the actual Statement and Response back from DB2 using TOAD.

What I'm looking for is for someone who understands what the actual statements constructed using the DSNUTILS SP should be and to share their knowledge with me as what the calls should be.
Or alternatively point me to a reference with some working examples.

RUNSTATS TABLESPACE IMGD002.IMGSADSI TABLE(ALL) INDEX(ALL KEYCARD) SHRLEVEL CHANGE

SEQNO TEXT



--------------------------------------------------------------------------------
1 1DSNU000I 192 11:57:24.61 DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = TOADDB2#27800899
2 DSNU1045I 192 11:57:24.72 DSNUGTIS - PROCESSING SYSIN AS UNICODE UTF-8
3 0DSNU050I 192 11:57:24.73 DSNUGUTC - RUNSTATS TABLESPACE IMGD002.IMGSADSI TABLE(ALL) INDEX(ALL KEYCARD) SHRLEVEL
4 CHANGE
5 DSNU610I -DBEQ 192 11:57:24.83 DSNUSUTP - SYSTABLEPART CATALOG UPDATE FOR IMGD002.IMGSADSI SUCCESSFUL
6 DSNU610I -DBEQ 192 11:57:24.83 DSNUSUTB - SYSTABLES CATALOG UPDATE FOR DBQIMGR.IMGT_ADJUST_SIGNINGS_FT2 SUCCESSFUL
7 DSNU610I -DBEQ 192 11:57:24.93 DSNUSUCO - SYSCOLUMNS CATALOG UPDATE FOR DBQIMGR.IMGT_ADJUST_SIGNINGS_FT2 SUCCESSFUL
8 DSNU610I -DBEQ 192 11:57:24.93 DSNUSUTB - SYSTABLES CATALOG UPDATE FOR DBQIMGR.IMGT_ADJUST_SIGNINGS_FT SUCCESSFUL
9 DSNU610I -DBEQ 192 11:57:25.04 DSNUSUCO - SYSCOLUMNS CATALOG UPDATE FOR DBQIMGR.IMGT_ADJUST_SIGNINGS_FT SUCCESSFUL
10 DSNU610I -DBEQ 192 11:57:25.04 DSNUSUTS - SYSTABLESPACE CATALOG UPDATE FOR IMGD002.IMGSADSI SUCCESSFUL
11 DSNU610I -DBEQ 192 11:57:25.05 DSNUSUIP - SYSINDEXPART CATALOG UPDATE FOR DBQIMGR.IMGXN_C_ADJUST_SGNGS_FT2_IDX01
12 SUCCESSFUL
13 DSNU610I -DBEQ 192 11:57:25.06 DSNUSUIP - SYSINDEXPART CATALOG UPDATE FOR DBQIMGR.IMGXU_C_ADJUST_SGNNGS_FT2_IDX01
14 SUCCESSFUL
15 DSNU610I -DBEQ 192 11:57:25.06 DSNUSUIP - SYSINDEXPART CATALOG UPDATE FOR DBQIMGR.IMGXN_C_ADJUST_SGNGS_FT_IDX01
16 SUCCESSFUL
17 DSNU610I -DBEQ 192 11:57:25.06 DSNUSUIP - SYSINDEXPART CATALOG UPDATE FOR DBQIMGR.IMGXU_C_ADJUST_SGNNGS_FT_IDX01
18 SUCCESSFUL
19 DSNU610I -DBEQ 192 11:57:25.07 DSNUSUCO - SYSCOLUMNS CATALOG UPDATE FOR DBQIMGR.IMGXN_C_ADJUST_SGNGS_FT2_IDX01
20 SUCCESSFUL
21 DSNU610I -DBEQ 192 11:57:25.07 DSNUSUIX - SYSINDEXES CATALOG UPDATE FOR DBQIMGR.IMGXN_C_ADJUST_SGNGS_FT2_IDX01
22 SUCCESSFUL
23 DSNU610I -DBEQ 192 11:57:25.07 DSNUSUCO - SYSCOLUMNS CATALOG UPDATE FOR DBQIMGR.IMGXU_C_ADJUST_SGNNGS_FT2_IDX01
24 SUCCESSFUL
25 DSNU610I -DBEQ 192 11:57:25.07 DSNUSUIX - SYSINDEXES CATALOG UPDATE FOR DBQIMGR.IMGXU_C_ADJUST_SGNNGS_FT2_IDX01
26 SUCCESSFUL
27 DSNU610I -DBEQ 192 11:57:25.08 DSNUSUCO - SYSCOLUMNS CATALOG UPDATE FOR DBQIMGR.IMGXN_C_ADJUST_SGNGS_FT_IDX01
28 SUCCESSFUL
29 DSNU610I -DBEQ 192 11:57:25.08 DSNUSUIX - SYSINDEXES CATALOG UPDATE FOR DBQIMGR.IMGXN_C_ADJUST_SGNGS_FT_IDX01
30 SUCCESSFUL
31 DSNU610I -DBEQ 192 11:57:25.08 DSNUSUCO - SYSCOLUMNS CATALOG UPDATE FOR DBQIMGR.IMGXU_C_ADJUST_SGNNGS_FT_IDX01
32 SUCCESSFUL
33 DSNU610I -DBEQ 192 11:57:25.08 DSNUSUIX - SYSINDEXES CATALOG UPDATE FOR DBQIMGR.IMGXU_C_ADJUST_SGNNGS_FT_IDX01
34 SUCCESSFUL
35 DSNU610I -DBEQ 192 11:57:25.09 DSNUSUCD - SYSCOLDIST CATALOG UPDATE FOR DBQIMGR.IMGXN_C_ADJUST_SGNGS_FT2_IDX01
36 SUCCESSFUL
37 DSNU610I -DBEQ 192 11:57:25.09 DSNUSUCD - SYSCOLDIST CATALOG UPDATE FOR DBQIMGR.IMGXN_C_ADJUST_SGNGS_FT_IDX01
38 SUCCESSFUL
39 DSNU620I -DBEQ 192 11:57:25.09 DSNUSEOF - RUNSTATS CATALOG TIMESTAMP = 2011-07-11-11.57.24.758791
40 DSNU010I 192 11:57:25.11 DSNUGBAC - UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=0

Regards
Nick
Post Reply