i can

Dawn May

Dawn May

Bookmark and Share

October 2014

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

« Clone an Integrated Windows Server | Main | Job Log Pending »

June 21, 2011


IBM should be embarrased that the system has no simple, meaningful,workable Query Object Analysis tool and we have to get it from Lab Services (which I assume is chargeable).AND the SQL statement you offer is meaningless as it outputs to a spool file and can only do 1 query at a time.Pathetic. I love the platform but I sincerely believe that IBM is only marginally commited to the system i. Why can't it come with things that work SIMPLY and output NATIVELY to a usable and friendly format (Excel, PDF..). I can go on and on but it really is sad and painful to watch the slow demise of a beloved system.

Thanks for the feedback Harry. My apologies - I should have done a better job explaining and positioning this.

First off, the article was intended to inform readers about this stored procedure because most that I talk to are not even aware of it. Similar to some DSPxxxxx system commands (such as the DSPLIB command), there is no option to dump the data into a database file - only a spooled file. So like those commands if you wanted to be able to read that information using SQL or RPG, you would have to use something like the CPYSPLF command to get it there. Since the spooled file has a variety of information, you would also have to write some programs to extract, parse, and organize the data so that it can be easily harvested for some low level analysis. You can certainly do this, but obviously it takes time and the Lab Services group has already done this.

One of the many advantanges of having the Lab Services group around is that we (in the development lab) can and do sometimes bring their code into the OS to fill gaps. This might be one of those cases. In the meantime we are working with Lab Services to make this tool available at no charge. They are doing some additional enhancments and packaging work - so it should be avaiable soon. When its ready, I will post details here (as a new posted comment). It will likely be uploaded somewhere where it can be easily downloaded by you and others. But be warned, it will be "as is" code so there is no support nor guarantee that anything wrong will be fixed. But it should be a good tool to get you going.

However something I may not have made very clear in my article is that having this information in a db file is only a small step in the modernization process. As I mentioned in the article, our customers have many, many Query/400 objects out there (over 20,000 in one case). Many are still used and relevant - quite a few are not. Many are duplicates or very similar to other queries. Some were created in the 80's and no one has the foggiest idea what they are used for and if they still need to be kept around.

So let's say you had 3,000 Query/400 objects on your system and you use this tool to analyze things. What is your next step? You probably don't have time to write 3,000 equivalent Web Query reports - not would you want to as this would be quite unmanageable. You probably have neither the time nor inclination to really dig down and analyze and compare them to weed out the duplicates and non-essential ones. This is the real value of the Lab Services offering - to help you through this process and at the end of the day, produce a set of Web Query metadata, domains,folders, and reports that is organized and manageable. And maybe throw in a few fancy graphs and dashboards while they are at it!

I hope this helps. Again, I will post details here when the tool is ready to be downloaded.

Thanks again.

Update to this discussion: The Query/400 Discovery tool is now available at no charge! More info below...

The DB2 Lab Services team has put together a utility based on the stored procedure Print_Query_Definition (described in the linked article) to extract information about Query/400 definitions into a set of tables that can then be analyzed to understand information about the ten's, or hundred's of query definitions built over time and present on your system. The Lab Services group use this utility as part of an overall "Query/400 modernization" services offering. Based on popular demand, we have decided to make this available to anyone.

Provided on an "as is", best effort support basis, this tool is documented here ( and can be requested by sending an e-mail to [email protected]

The link returns an error: (I'm on Windows 7)
Oops, that didn't work
Something went wrong - click the back button and try again. If this doesn't work report the problem to the support forum. If someone sent you this link, check to see if you've been granted permission.

Back to Wikis

Hi Harry,

I tried to make that URL shorter and easier to use. Will this one work for you? I had to sign in with my IBM info before I could use the wikis.

Tami, managing editor

The comments to this entry are closed.