Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SQL QUERY to detect AREO and REORP conditions.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
imellis

New User


Joined: 29 Jun 2010
Posts: 2
Location: UK

PostPosted: Wed Nov 07, 2012 6:32 pm    Post subject: SQL QUERY to detect AREO and REORP conditions.
Reply with quote

Hi

We have been writing a REXX program to do smart reorgs. It looks at RTS or RUNSTATS and determines from the stats if it thinks that a REORG is necessary and then builds a LISTDEF for a REORG step further along in the JCL.

This is working nicely. But now I want to add some additional functionality to automatically detect AREO and REORP conditions and prioritise those tablespaces for reorg. But after much Googling and rummaging in the manuals I cannot seem to find a method of doing this as part of an SQL query.

So either it's not possible or I'm missing something obvious.

Does anyone have an answer please?

Thank you in advance.
Back to top
View user's profile Send private message

don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 642
Location: Whitby, ON, Canada

PostPosted: Thu Nov 08, 2012 12:30 am    Post subject:
Reply with quote

I don't think you are missing anything obvious. The only solution I could think of would be to trap the output from the -DIS DATABASE command and use that in your procedure.
Back to top
View user's profile Send private message
imellis

New User


Joined: 29 Jun 2010
Posts: 2
Location: UK

PostPosted: Thu Nov 08, 2012 1:55 am    Post subject: Reply to: SQL QUERY to detect AREO and REORP conditions.
Reply with quote

I'd already thought of scraping the information out of the -DIS DB command output. It's just that it doesn't integrate well the program I have thus far without making big changes. Finding a more SQL friendly way would be better, if one exists.

Such a feature exists in DB2 LUW, but IBM haven't replicated that functionality in the z/OS edition of their product, which is a shame.

I have figured out a way to go the -DISPLAY command route if I have to, but I didn't want to make any more work for myself than necessary if there was an SQL query that would do the job.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Mon Nov 12, 2012 3:12 pm    Post subject:
Reply with quote

DSNACCOX()
querytype = 'RESTRICT'
chklvl = 8
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Nov 15, 2012 1:13 am    Post subject:
Reply with quote

as a follow-up to GuyC's post about DSNACCOX
http://ibmsystemsmag.blogs.com/db2utor/2012/11/db2-performance-stored-procedures.html
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us