IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Execute RUNSTATS on all the DB2 tables


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
maverick05

New User


Joined: 14 Apr 2005
Posts: 54
Location: Earth

PostPosted: Wed Jun 06, 2012 10:26 pm
Reply with quote

Partitoned table spaces always have 1 table each.
How to execute RUNSTATS on all the Db2 tables present in all table spaces in a database at once?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Jun 06, 2012 10:37 pm
Reply with quote

  1. Use a suitable product (i.e.PL/I or Rexx with encapsulated SQL) to read the SYSDATABASE table and fabricate suitable control cards.
  2. Submit one or more jobs using these control cards.
  3. Hi, Opal!
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Jun 06, 2012 11:03 pm
Reply with quote

How about LISTDEF + RUNSTATS??
Back to top
View user's profile Send private message
maverick05

New User


Joined: 14 Apr 2005
Posts: 54
Location: Earth

PostPosted: Wed Jun 06, 2012 11:48 pm
Reply with quote

I saw that option but not comfortable with that.So do you list the database name in LISt option?

RUNSTATS TABLESPACE
LIST RUNSTATS_DATABASENAME
TABLE (ALL) INDEX (ALL KEYCARD)
UPDATE ALL
REPORT YES
SHRLEVEL REFERENCE
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Thu Jun 07, 2012 12:48 am
Reply with quote

Google listdef for examples
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Sat Jun 09, 2012 2:25 am
Reply with quote

You need to have two statements:

1. LISTDEF which specifies the tablespace name. Use the PARTLEVEL keyword, with no partition number specified. You need to specify a name for the LISTDEF so you can refer to it later, for example MYLISTS

2. on RUNSTATS specify LIST MYLISTS.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Fetch data from programs execute (dat... DB2 3
This topic is locked: you cannot edit posts or make replies. How To Write, Compile and Execute Cob... COBOL Programming 5
No new posts Need to fetch data from so many DB2 t... DB2 9
No new posts Evaluate variable to execute a jcl step JCL & VSAM 3
Search our Forums:

Back to Top