<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WorkingScripts &#187; Tips</title>
	<atom:link href="http://workingscripts.com/tag/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://workingscripts.com</link>
	<description>The Stuff that Just Works</description>
	<lastBuildDate>Thu, 27 Oct 2011 17:03:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>What Environment Am I in?</title>
		<link>http://workingscripts.com/2009/07/what-environment-am-i-in/</link>
		<comments>http://workingscripts.com/2009/07/what-environment-am-i-in/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 03:44:00 +0000</pubDate>
		<dc:creator>Iouri Chadour</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PeopleSoft]]></category>
		<category><![CDATA[PeopleTools]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://workingscripts.com/2009/07/what-environment-am-i-in/</guid>
		<description><![CDATA[As I was going through some of the sessions on the QUEST NORTHEAST CONFERENCE I noticed on of the presenters mentioning customizing Test environments Main PeopleSoft CSS PSSTYLEDEF so that the users are always able to distinguish between environments. The solution that I have employ to solve this problem is to modify the PT_BRANDING:BrandingBase class <a href='http://workingscripts.com/2009/07/what-environment-am-i-in/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p align="left">As I was going through some of the sessions on the <a title="QUEST NORTHEAST CONFERENCE" href="http://www.questdirect.org/QuestDirect/Events/Quest+Northeast/" target="_blank">QUEST NORTHEAST CONFERENCE</a> I noticed on of the presenters mentioning customizing Test environments Main PeopleSoft CSS PSSTYLEDEF so that the users are always able to distinguish between environments.</p>
<p align="left">The solution that I have employ to solve this problem is to modify the PT_BRANDING:BrandingBase class to dynamically display environment name based on the URL, like this:</p>
<p align="left"><a href="http://workingscripts.com/wp-content/uploads/2009/07/captured_Image.png.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="captured_Image.png" src="http://workingscripts.com/wp-content/uploads/2009/07/captured_Image.png_thumb.jpg" border="0" alt="captured_Image.png" width="244" height="73" /></a></p>
<p align="left">PT_BRANDING Application package was meant to be used to dynamically customize the look and feel of you application and of course you can do a lot more with this but this is just a very simple example of how easy this can be done.</p>
<p align="left">In order to achieve the above effect all you need is to add code to 2 methods in the class PT_BRANDING:BrandingBase</p>
<div>
<pre class="csharpcode">method GetUniHeaderHTML
method GetUniHeaderHTML_PIA</pre>
</div>
<p align="left">
<p><!--.csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<p align="left">These methods, as the name suggests are responsible for rendering you Application Portal Header.</p>
<div>
<div id="codeSnippetWrapper" style="border: 1px solid silver; margin: 20px 0px 10px; padding: 4px; overflow: auto; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 97.88%; font-family: 'Courier New',courier,monospace; direction: ltr; height: 210px; max-height: 200px; font-size: 8pt; cursor: text;">
<pre id="codeSnippet" style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span style="color: #008000">/*Iouri Chadour - Added to put Test Environment notification in the header</span><span style="color: #008000">&amp;Request.ContentURI - returns your portal URL in form http://server:port/psp/PSPRC/</span><span style="color: #008000">Left(Right(&amp;Request.ContentURI, 4), 3) - extracts the significant piece to display</span><span style="color: #008000">on the header*/</span>
&amp;zEnvName = Left(Right(&amp;Request.ContentURI, 4), 3);
&amp;Greeting = &amp;zEnvName | " Environment " | ", UserID:" | <span style="color: #0000ff;">%UserId </span>| ", Name: " | <span style="color: #0000ff;">%UserDescription</span>;
<span style="color: #008000">/* End Mod */</span>

<span style="color: #008000">/* This code below is delivered checks for client browser to ensure that</span><span style="color: #008000"> Header is displayed correctly */</span>

If &amp;navTheme.isNS4x() Then    &amp;UniHeaderHTMLPIA = GetHTMLText(HTML.PORTAL_UNI_HEADER_NS4X, &amp;Response.GetImageURL(Image.NEW_PS_LOGO), &amp;Response.GetImageURL(Image.NEW_PORTAL_HDR_TBRCRV), <span style="color: #006080">" "</span>, <span style="color: #006080">" "</span>, &amp;FavoritesHTML, &amp;AddToFavoritesHTML, &amp;HelpHTML, <span style="color: #006080">""</span>, &amp;Response.GetImageURL(Image.NEW_PORTAL_HDR_CRV), &amp;Response.GetImageURL(Image.NEW_PORTAL_HDR_BG), &amp;Response.GetImageURL(Image.NEW_PORTAL_HDR_BG), &amp;Response.GetImageURL(Image.NEW_PORTAL_HDR_TBRCRV), &amp;Response.GetImageURL(Image.NEW_PORTAL_HDR_SHD), &amp;Response.GetImageURL(Image.NEW_PORTAL_HDR_TBR), &amp;styleSheet, &amp;homeURL, &amp;startURL, &amp;AddToFavFormHTML, &amp;LogoutURL, MsgGetText(95, 400, <span style="color: #006080">"Return Home"</span>), <span style="color: #008000">/*20*/</span>MsgGetText(95, 401, <span style="color: #006080">"Home"</span>), MsgGetText(95, 402, <span style="color: #006080">"Return to Menu"</span>), MsgGetText(95, 403, <span style="color: #006080">"Menu"</span>), MsgGetText(95, 408, <span style="color: #006080">"Sign out"</span>), &amp;Greeting, &amp;SearchHTML, &amp;ColSpanHTML, &amp;PersonalizeHTML, <span style="color: #006080">""</span>, <span style="color: #006080">""</span>, &amp;HelpJSHTML, &amp;homepageJS, <span style="color: #006080">""</span>, &amp;TabHTML, &amp;WLHTML, &amp;domainScript, &amp;Response.GetJavaScriptURL(HTML.PT_SAVEWARNINGSCRIPT), <span style="color: #006080">""</span>, &amp;SaveWarnCrossDomainScript, &amp;Response.GetImageURL(Image.PT_HOME_TAB_ACTIVE_CENTER), &amp;Response.GetImageURL(Image.PT_HOME_TAB_INACTIVE_CENTER), <span style="color: #008000">/*40*/</span>&amp;Response.GetImageURL(Image.PT_HOME_TAB_LINE), %Request.ExpireMeta, &amp;CTIHTML, &amp;MCFHTML, &amp;PPMHTML, &amp;Charset);ElseElse    &amp;UniHeaderHTMLPIA = GetHTMLText(HTML.PORTAL_UNI_HEADER_NNS, &amp;Response.GetImageURL(Image.NEW_PS_LOGO), &amp;Response.GetImageURL(Image.NEW_PORTAL_HDR_TBRCRV), <span style="color: #006080">""</span>, <span style="color: #006080">""</span>, &amp;FavoritesHTML, &amp;AddToFavoritesHTML, &amp;HelpHTML, <span style="color: #006080">""</span>, &amp;Response.GetImageURL(Image.NEW_PORTAL_HDR_CRV), &amp;Response.GetImageURL(Image.NEW_PORTAL_HDR_BG), &amp;Response.GetImageURL(Image.NEW_PORTAL_HDR_BG), &amp;Response.GetImageURL(Image.NEW_PORTAL_HDR_TBRCRV), &amp;Response.GetImageURL(Image.NEW_PORTAL_HDR_SHD), &amp;Response.GetImageURL(Image.NEW_PORTAL_HDR_TBR), &amp;styleSheet, &amp;homeURL, &amp;startURL, &amp;AddToFavFormHTML, &amp;LogoutURL, MsgGetText(95, 400, <span style="color: #006080">"Return Home"</span>), <span style="color: #008000">/*20*/</span>MsgGetText(95, 401, <span style="color: #006080">"Home"</span>), MsgGetText(95, 402, <span style="color: #006080">"Return to Menu"</span>), MsgGetText(95, 403, <span style="color: #006080">"Menu"</span>), MsgGetText(95, 408, <span style="color: #006080">"Sign out"</span>), &amp;Greeting, &amp;SearchHTML, &amp;ColSpanHTML, &amp;PersonalizeHTML, <span style="color: #006080">""</span>, <span style="color: #006080">""</span>, &amp;HelpJSHTML, &amp;homepageJS, MsgGetText(95, 138, <span style="color: #006080">"Tool Bar Header"</span>), &amp;TabHTML, &amp;WLHTML, &amp;domainScript, &amp;Response.GetJavaScriptURL(HTML.PT_SAVEWARNINGSCRIPT), <span style="color: #006080">""</span>, &amp;SaveWarnCrossDomainScript, &amp;Response.GetImageURL(Image.PT_HOME_TAB_ACTIVE_CENTER), &amp;Response.GetImageURL(Image.PT_HOME_TAB_INACTIVE_CENTER), <span style="color: #008000">/*40*/</span>&amp;Response.GetImageURL(Image.PT_HOME_TAB_LINE), %Request.ExpireMeta, &amp;CTIHTML, &amp;MCFHTML, &amp;PPMHTML, &amp;Charset); End-If;</pre>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://workingscripts.com/2009/07/what-environment-am-i-in/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>PeopleTools 8.50 Overview</title>
		<link>http://workingscripts.com/2009/06/peopletools-850-overview/</link>
		<comments>http://workingscripts.com/2009/06/peopletools-850-overview/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 04:23:55 +0000</pubDate>
		<dc:creator>David Quintman</dc:creator>
				<category><![CDATA[PeopleTools]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://workingscripts.com/?p=76</guid>
		<description><![CDATA[Here is a link to an excellent presentation from Oracle of PeopleTools 8.50 features. PeopleSoft is really going Web 2.0! peoplesoft_workspace_and_pt850.swf (application/x-shockwave-flash Object) Also please see our previous post about Tools 8.50 overview]]></description>
			<content:encoded><![CDATA[<p>Here is a link to an excellent presentation from Oracle of PeopleTools 8.50 features. PeopleSoft is really going Web 2.0!</p>
<p><a href="http://download-llnw.oracle.com/otndocs/peoplesoft/peopletools/peoplesoft_workspace_and_pt850.swf">peoplesoft_workspace_and_pt850.swf (application/x-shockwave-flash Object)</a></p>
<p>Also please see our <a href="http://workingscripts.com/wp-trackback.php?p=33" target="_blank">previous post</a> about Tools 8.50 overview </p>
]]></content:encoded>
			<wfw:commentRss>http://workingscripts.com/2009/06/peopletools-850-overview/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>DB2 Escape characters in queries</title>
		<link>http://workingscripts.com/2009/02/db2-escape-characters/</link>
		<comments>http://workingscripts.com/2009/02/db2-escape-characters/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 05:05:00 +0000</pubDate>
		<dc:creator>Iouri Chadour</dc:creator>
				<category><![CDATA[DB2]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://workingscripts.com/?p=41</guid>
		<description><![CDATA[Recently I had to use escape characters in DB2 queries and after looking through documentation here is a simple way to do this. You can define you escape character using {escape '\'} &#160; right after the statement your are trying to use it, here is a sample statement: select oprid, oprdefndesc from psoprdefn where oprid <a href='http://workingscripts.com/2009/02/db2-escape-characters/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Recently I had to use escape characters in DB2 queries and after looking through documentation here is a simple way to do this. You can define you escape character using </p>
<pre class="csharpcode">{<span class="kwrd">escape</span> <span class="str">'\'</span>}</pre>
<p>&#160;</p>
<p>right after the statement your are trying to use it, here is a sample statement:</p>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">select</span> oprid, oprdefndesc</pre>
<pre><span class="kwrd">from</span> psoprdefn</pre>
<pre class="alt"><span class="kwrd">where</span> oprid <span class="kwrd">like</span> <span class="str">'%\_%'</span> {<span class="kwrd">escape</span> <span class="str">'\'</span>} </pre>
</div>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
]]></content:encoded>
			<wfw:commentRss>http://workingscripts.com/2009/02/db2-escape-characters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Information about PeopleSoft Components from Database</title>
		<link>http://workingscripts.com/2008/06/peoplesoft-components-database/</link>
		<comments>http://workingscripts.com/2008/06/peoplesoft-components-database/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 22:20:00 +0000</pubDate>
		<dc:creator>Iouri Chadour</dc:creator>
				<category><![CDATA[PeopleSoft]]></category>
		<category><![CDATA[PeopleTools]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://workingscripts.com/?p=44</guid>
		<description><![CDATA[SQLs below have proved to be great while working behind the scenes and creating report about PeopleSoft customizations. These are quick ways to get behind the scenes and see the objects the way PeopleSoft sees it. Getting fields and records for a page: select OCCURSLEVEL as level ,FIELDNUM as taborder, LBLTEXT as label , RECNAME <a href='http://workingscripts.com/2008/06/peoplesoft-components-database/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>SQLs below have proved to be great while working behind the scenes and creating report about PeopleSoft customizations. These are quick ways to get behind the scenes and see the objects the way PeopleSoft sees it.</p>
<p><strong>Getting fields and records for a page:</strong></p>
<p><!--.csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<div id="codeSnippetWrapper" style="border: 1px solid silver; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;">
<pre id="codeSnippet" style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;"><span style="color: #0000ff">select</span> OCCURSLEVEL <span style="color: #0000ff">as</span> <span style="color: #0000ff">level</span> ,FIELDNUM <span style="color: #0000ff">as</span> taborder, LBLTEXT <span style="color: #0000ff">as</span> label ,
RECNAME <span style="color: #0000ff">as</span> record ,FIELDNAME <span style="color: #0000ff">as</span> field<span style="color: #0000ff">
from</span> PSFSSYS.PSPNLFIELD
<span style="color: #0000ff">where</span> PNLNAME =<span style="color: #006080">'PORTAL_HPCOMP'</span><span style="color: #0000ff">order</span> <span style="color: #0000ff">by</span> OCCURSLEVEL, FIELDNUM</pre>
</div>
<p><strong>Get information about Project Compares :</strong></p>
<div id="codeSnippetWrapper" style="border: 1px solid silver; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;">
<pre id="codeSnippet" style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;"><span style="color: #0000ff">SELECT</span> PROJECTNAME, VERSION, PROJECTDESCR, TGTSERVERNAME, TGTDBNAME, TGTOPRID,
TGTOPRACCT, COMPRELEASE, SRCCOMPRELDTTM, TGTCOMPRELDTTM, COMPRELDTTM, KEEPTGT,
TGTORIENTATION, COMPARETYPE,
COMMITLIMIT, REPORTFILTER, MAINTPROJ, LASTUPDDTTM, LASTUPDOPRID, RELEASELABEL,
RELEASEDTTM, OBJECTOWNERID, DESCRLONG <span style="color: #0000ff">FROM</span> PSPROJECTDEFN</pre>
</div>
<p><!--.csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<p>G<strong>et Record Audit Flags:</strong></p>
<div id="codeSnippetWrapper" style="border: 1px solid silver; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;">
<pre id="codeSnippet" style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;"><span style="color: #0000ff">SELECT</span> RECNAME, FIELDNUM, FIELDNAME,
<span style="color: #0000ff">INTEGER</span>(USEEDIT / 8) - <span style="color: #0000ff">INTEGER</span> (USEEDIT / 16) * 2 <span style="color: #0000ff">as</span> "<span style="color: #0000ff">ADD</span>", <span style="color: #0000ff">
INTEGER</span>(USEEDIT / 128) - <span style="color: #0000ff">INTEGER</span>(USEEDIT / 256)*2 <span style="color: #0000ff">as</span> "CHANGE", <span style="color: #0000ff">
INTEGER</span>(USEEDIT / 1024) - <span style="color: #0000ff">INTEGER</span>(USEEDIT/ 2048)*2  <span style="color: #0000ff">as</span> "<span style="color: #0000ff">DELETE</span>"
<span style="color: #0000ff">FROM</span> PSRECFIELD <span style="color: #0000ff">
     WHERE</span>  RECNAME = <span style="color: #006080">'PSOPRDEFN'</span> <span style="color: #0000ff">
             and</span> USEEDIT &lt;&gt; 0       <span style="color: #0000ff">
             AND</span> (<span style="color: #0000ff">INTEGER</span> (USEEDIT / 128) - <span style="color: #0000ff">INTEGER</span> (USEEDIT / 256) * 2 &lt;&gt; 0
             <span style="color: #0000ff">OR</span> <span style="color: #0000ff">INTEGER</span> (USEEDIT / 8) - <span style="color: #0000ff">INTEGER</span> (USEEDIT / 16) * 2 &lt;&gt; 0
             <span style="color: #0000ff">OR</span> <span style="color: #0000ff">INTEGER</span> (USEEDIT / 1024) - <span style="color: #0000ff">INTEGER</span> (USEEDIT / 2048) * 2 &lt;&gt; 0)
            <span style="color: #0000ff">ORDER</span> <span style="color: #0000ff">BY</span> RECNAME, FIELDNUM;</pre>
</div>
<p><strong>Get Record Field Types and Definitions:</strong></p>
<div id="codeSnippetWrapper" style="border: 1px solid silver; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;">
<pre id="codeSnippet" style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;"><span style="color: #008000">-- GET RECORD NAME DEFINITION
</span><span style="color: #0000ff">  SELECT</span> A.RECNAME, A.FIELDNAME,
         <span style="color: #0000ff">CASE</span>
            <span style="color: #0000ff">WHEN</span> B.FIELDTYPE = 0  <span style="color: #0000ff">THEN</span> <span style="color: #006080">'CHAR'</span>
            <span style="color: #0000ff">WHEN</span> B.FIELDTYPE = 1       <span style="color: #0000ff">THEN</span>             <span style="color: #006080">'LONG CHAR'</span>          <span style="color: #0000ff">
            WHEN</span> B.FIELDTYPE = 2       <span style="color: #0000ff">THEN</span>             <span style="color: #006080">'NUMBER'</span>
            <span style="color: #0000ff">WHEN</span> B.FIELDTYPE = 3       <span style="color: #0000ff">THEN</span>             <span style="color: #006080">'SIGNED NBR'</span>
            <span style="color: #0000ff">WHEN</span> B.FIELDTYPE = 4       <span style="color: #0000ff">THEN</span>             <span style="color: #006080">'DATE'</span>
            <span style="color: #0000ff">WHEN</span> B.FIELDTYPE = 5       <span style="color: #0000ff">THEN</span>             <span style="color: #006080">'TIME'</span>
            <span style="color: #0000ff">WHEN</span> B.FIELDTYPE = 6       <span style="color: #0000ff">THEN</span>             <span style="color: #006080">'DATETIME'</span>
            <span style="color: #0000ff">WHEN</span> B.FIELDTYPE = 7 <span style="color: #0000ff">OR</span> B.FIELDTYPE = 8       <span style="color: #0000ff">THEN</span>   <span style="color: #006080">'IMAGE'</span>          <span style="color: #0000ff">
            ELSE</span>  <span style="color: #0000ff">NULL</span>       <span style="color: #0000ff">
         END</span>  <span style="color: #0000ff">AS</span> FIELDTYPE,
         <span style="color: #0000ff">CASE</span>          <span style="color: #0000ff">
             WHEN</span> B.FIELDTYPE = 2       <span style="color: #0000ff">
                  OR</span> B.FIELDTYPE = 3  <span style="color: #0000ff">THEN</span>  RTRIM (<span style="color: #0000ff">CHAR</span> (B.LENGTH))|| <span style="color: #006080">'.'</span>||<span style="color: #0000ff">CHAR</span> (B.DECIMALPOS)          <span style="color: #0000ff">
             ELSE</span> <span style="color: #0000ff">CHAR</span> (B.LENGTH)       <span style="color: #0000ff">
         END</span>  <span style="color: #0000ff">AS</span> FLDLEN,
         <span style="color: #0000ff">CASE</span>          <span style="color: #0000ff">
            WHEN</span> (A.USEEDIT/ 256)/ 2 &lt;&gt;  (A.USEEDIT/ 256)/ 2.0       <span style="color: #0000ff">
                  THEN</span> <span style="color: #006080">'YES'</span> <span style="color: #0000ff">ELSE</span> <span style="color: #006080">'NO'</span>
         <span style="color: #0000ff">END</span>  <span style="color: #0000ff">AS</span> REQ,
         <span style="color: #0000ff">CASE</span>          <span style="color: #0000ff">
             WHEN</span> A.USEEDIT/ 2 &lt;&gt; A.USEEDIT/ 2.0       <span style="color: #0000ff">
                  THEN</span>             <span style="color: #006080">'KEY'</span>          <span style="color: #0000ff">
             WHEN</span> (A.USEEDIT/ 2)/ 2 &lt;&gt; (A.USEEDIT/ 2)/ 2.0       <span style="color: #0000ff">
                  THEN</span>             <span style="color: #006080">'DUP'</span>
             <span style="color: #0000ff">WHEN</span> (A.USEEDIT/ 16)/ 2 &lt;&gt;(A.USEEDIT/16)/ 2.0
                  <span style="color: #0000ff">THEN</span> <span style="color: #006080">'ALT'</span>          <span style="color: #0000ff">
             ELSE</span> <span style="color: #0000ff">NULL</span>       <span style="color: #0000ff">
        END</span>  <span style="color: #0000ff">AS</span> KEY_TYPE, <span style="color: #0000ff">
        CASE</span>
            <span style="color: #0000ff">WHEN</span> (A.USEEDIT / 64) / 2 &lt;&gt; (A.USEEDIT/64)/2.0       <span style="color: #0000ff">
                  THEN</span>             <span style="color: #006080">'DESC'</span>
            <span style="color: #0000ff">WHEN</span> (A.USEEDIT / 2 &lt;&gt; A.USEEDIT / 2.0       <span style="color: #0000ff">
                  OR</span> (A.USEEDIT / 2) / 2 &lt;&gt; (A.USEEDIT / 2) / 2.0       <span style="color: #0000ff">
                  OR</span> (A.USEEDIT / 16) / 2 &lt;&gt; (A.USEEDIT / 16) / 2.0)       <span style="color: #0000ff">
                  AND</span> (A.USEEDIT / 64) / 2 = (A.USEEDIT / 64) / 2.0       <span style="color: #0000ff">
                  THEN</span>             <span style="color: #006080">'ASC'</span>
           <span style="color: #0000ff">ELSE</span>             <span style="color: #0000ff">NULL</span>       <span style="color: #0000ff">
        END</span>  <span style="color: #0000ff">AS</span> DIR,
        <span style="color: #0000ff">CASE</span>
            <span style="color: #0000ff">WHEN</span> (A.USEEDIT / 2048) / 2 &lt;&gt; (A.USEEDIT / 2048) / 2.0       <span style="color: #0000ff">
                 THEN</span>             <span style="color: #006080">'YES'</span>
            <span style="color: #0000ff">ELSE</span>             <span style="color: #006080">'NO'</span>
        <span style="color: #0000ff">END</span>  <span style="color: #0000ff">AS</span> SRCH,
        <span style="color: #0000ff">CASE</span>
           <span style="color: #0000ff">WHEN</span> (A.USEEDIT / 32) / 2 &lt;&gt; (A.USEEDIT / 32) / 2.0
                <span style="color: #0000ff">THEN</span>             <span style="color: #006080">'YES'</span>
           <span style="color: #0000ff">ELSE</span>             <span style="color: #006080">'NO'</span>
        <span style="color: #0000ff">END</span>  <span style="color: #0000ff">AS</span> LIST,
        <span style="color: #0000ff">CASE</span>          <span style="color: #0000ff">WHEN</span> (A.USEEDIT / 4)/ 2 &lt;&gt;(A.USEEDIT / 4)/ 2.0       <span style="color: #0000ff">
            THEN</span>             <span style="color: #006080">'YES'</span>
        <span style="color: #0000ff">    ELSE</span>             <span style="color: #006080">'NO'</span>
        <span style="color: #0000ff">END</span>  <span style="color: #0000ff">AS</span> SYS, <span style="color: #0000ff">
        CASE</span>
            <span style="color: #0000ff">WHEN</span> A.DEFRECNAME = <span style="color: #006080">''</span>       <span style="color: #0000ff">
             THEN</span>             A.DEFFIELDNAME
             <span style="color: #0000ff">ELSE</span>             RTRIM(A.DEFRECNAME)|| <span style="color: #006080">'.'</span>|| A.DEFFIELDNAME
        <span style="color: #0000ff">END</span>  <span style="color: #0000ff">AS</span> DEFAULT_VALUE, <span style="color: #0000ff">
        CASE</span>
            <span style="color: #0000ff">WHEN</span> (A.USEEDIT / 8) / 2 &lt;&gt; (A.USEEDIT / 8) / 2.0
                 <span style="color: #0000ff">AND</span> (A.USEEDIT / 128) / 2 = (A.USEEDIT / 128) / 2.0       <span style="color: #0000ff">
                 AND</span> (A.USEEDIT / 1024) / 2 = (A.USEEDIT / 1024) / 2.0       <span style="color: #0000ff">
            THEN</span>             <span style="color: #006080">'A'</span>
            <span style="color: #0000ff">WHEN</span> (A.USEEDIT / 8) / 2 &lt;&gt; (A.USEEDIT / 8) / 2.0       <span style="color: #0000ff">
                  AND</span> (A.USEEDIT / 128) / 2 &lt;&gt; (A.USEEDIT / 128) / 2.0       <span style="color: #0000ff">
                  AND</span> (A.USEEDIT / 1024) / 2 = (A.USEEDIT / 1024) / 2.0
            <span style="color: #0000ff">THEN</span>             <span style="color: #006080">'AC'</span>
            <span style="color: #0000ff">WHEN</span> (A.USEEDIT / 8) / 2 &lt;&gt; (A.USEEDIT / 8) / 2.0
                  <span style="color: #0000ff">AND</span> (A.USEEDIT / 128) / 2 &lt;&gt; (A.USEEDIT / 128) / 2.0
                  <span style="color: #0000ff">AND</span> (A.USEEDIT / 1024) / 2 &lt;&gt; (A.USEEDIT / 1024) / 2.0       <span style="color: #0000ff">
            THEN</span>             <span style="color: #006080">'ACD'</span>
            <span style="color: #0000ff">WHEN</span> (A.USEEDIT / 8) / 2 = (A.USEEDIT / 8) / 2.0
                  <span style="color: #0000ff">AND</span> (A.USEEDIT / 128) / 2 &lt;&gt; (A.USEEDIT / 128) / 2.0       <span style="color: #0000ff">
                  AND</span> (A.USEEDIT / 1024) / 2 = (A.USEEDIT / 1024) / 2.0
            <span style="color: #0000ff">THEN</span>             <span style="color: #006080">'C'</span>
            <span style="color: #0000ff">WHEN</span> (A.USEEDIT / 8) / 2 = (A.USEEDIT / 8) / 2.0
            <span style="color: #0000ff">     AND</span> (A.USEEDIT / 128) / 2 &lt;&gt; (A.USEEDIT / 128) / 2.0
                 <span style="color: #0000ff">AND</span> (A.USEEDIT / 1024) / 2 &lt;&gt; (A.USEEDIT / 1024) / 2.0
                 <span style="color: #0000ff">THEN</span>             <span style="color: #006080">'CD'</span>
            <span style="color: #0000ff">WHEN</span> (A.USEEDIT / 8) / 2 = (A.USEEDIT / 8) / 2.0       <span style="color: #0000ff">
                 AND</span> (A.USEEDIT / 128) / 2 = (A.USEEDIT / 128) / 2.0
                 <span style="color: #0000ff">AND</span> (A.USEEDIT / 1024) / 2 &lt;&gt; (A.USEEDIT / 1024) / 2.0
           <span style="color: #0000ff">THEN</span>             <span style="color: #006080">'D'</span>
           <span style="color: #0000ff">ELSE</span>             <span style="color: #0000ff">NULL</span>       <span style="color: #0000ff">
           END</span>  <span style="color: #0000ff">AS</span> AUDT, <span style="color: #0000ff">CASE</span>          <span style="color: #0000ff">WHEN</span> (A.USEEDIT / 16384) / 2 &lt;&gt;          (A.USEEDIT / 16384) / 2.0       <span style="color: #0000ff">THEN</span>             <span style="color: #006080">'PROMPT'</span>          <span style="color: #0000ff">WHEN</span> (A.USEEDIT / 512) / 2 &lt;&gt;          (A.USEEDIT / 512) / 2.0       <span style="color: #0000ff">THEN</span>             <span style="color: #006080">'XLAT'</span>          <span style="color: #0000ff">WHEN</span> (A.USEEDIT / 8192) / 2 &lt;&gt;          (A.USEEDIT / 8192) / 2.0       <span style="color: #0000ff">THEN</span>             <span style="color: #006080">'Y/N'</span>          <span style="color: #0000ff">ELSE</span>             <span style="color: #0000ff">NULL</span>       <span style="color: #0000ff">END</span>  <span style="color: #0000ff">AS</span> EDIT, A.EDITTABLE  <span style="color: #0000ff">AS</span> PROMPT_TABLE, A.SETCNTRLFLD  <span style="color: #0000ff">AS</span>       SET_CONTROL_FLD, <span style="color: #0000ff">CASE</span>          <span style="color: #0000ff">WHEN</span> (A.USEEDIT / 4096) / 2 &lt;&gt;          (A.USEEDIT / 4096) / 2.0       <span style="color: #0000ff">THEN</span>             <span style="color: #006080">'YES'</span>          <span style="color: #0000ff">ELSE</span>             <span style="color: #006080">'NO'</span>       <span style="color: #0000ff">END</span>  <span style="color: #0000ff">AS</span> REASONABLE_DT, <span style="color: #0000ff">CASE</span>          <span style="color: #0000ff">WHEN</span> (A.USEEDIT       / 32768)       / 2 &lt;&gt;          (A.USEEDIT       / 32768)       / 2.0       <span style="color: #0000ff">THEN</span>             <span style="color: #006080">'YES'</span>          <span style="color: #0000ff">ELSE</span>             <span style="color: #006080">'NO'</span>       <span style="color: #0000ff">END</span>  <span style="color: #0000ff">AS</span> AUTO_UPDT, <span style="color: #0000ff">CASE</span>          <span style="color: #0000ff">WHEN</span> (A.USEEDIT / 262144) / 2 &lt;&gt; (A.USEEDIT / 262144) / 2.0       <span style="color: #0000ff">THEN</span>             <span style="color: #006080">'FROM'</span>          <span style="color: #0000ff">WHEN</span> (A.USEEDIT / 524288) / 2 &lt;&gt; (A.USEEDIT / 524288) / 2.0       <span style="color: #0000ff">THEN</span>             <span style="color: #006080">'THROUGH'</span>          <span style="color: #0000ff">ELSE</span>             <span style="color: #0000ff">NULL</span>       <span style="color: #0000ff">END</span>  <span style="color: #0000ff">AS</span> SEARCH_FIELD, <span style="color: #0000ff">CASE</span>          <span style="color: #0000ff">WHEN</span> A.SUBRECORD = <span style="color: #006080">'Y'</span> <span style="color: #0000ff">THEN</span> <span style="color: #006080">'YES'</span>          <span style="color: #0000ff">ELSE</span> <span style="color: #006080">'NO'</span>       <span style="color: #0000ff">END</span>  <span style="color: #0000ff">AS</span> SUBRECORD, A.LASTUPDDTTM, A.LASTUPDOPRID  <span style="color: #0000ff">FROM</span> PSRECFIELD A, PSDBFIELD B <span style="color: #0000ff">WHERE</span> A.RECNAME = <span style="color: #006080">'PSOPRDEFN'</span> <span style="color: #0000ff">AND</span> A.FIELDNAME = B.FIELDNAME<span style="color: #0000ff">ORDER</span> <span style="color: #0000ff">BY</span> FIELDNUM</pre>
</div>
<p><strong></strong></p>
<p><strong>Get Field Translate Values:</strong></p>
<div id="codeSnippetWrapper" style="border: 1px solid silver; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;">
<pre id="codeSnippet" style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;"><span style="color: #0000ff">SELECT</span> fieldvalue, eff_status, xlatlongname     <span style="color: #0000ff">FROM</span> psxlatitem i     <span style="color: #0000ff">WHERE</span> fieldname = <span style="color: #006080">'RUNSTATUS'</span>     <span style="color: #0000ff">AND</span> effdt = (         <span style="color: #0000ff">SELECT</span> <span style="color: #0000ff">max</span>(effdt)         <span style="color: #0000ff">FROM</span>   psxlatitem i1         <span style="color: #0000ff">WHERE</span>  i1.fieldname = i.fieldname         <span style="color: #0000ff">AND</span>    i1.fieldvalue = i.fieldvalue         <span style="color: #0000ff">AND</span>    i1.effdt &lt;= <span style="color: #0000ff">CURRENT</span> <span style="color: #0000ff">DATE</span>)    <span style="color: #0000ff">ORDER</span> <span style="color: #0000ff">BY</span> <span style="color: #0000ff">INTEGER</span>(fieldvalue)</pre>
</div>
<p><strong>Get information about PS Queries:</strong></p>
<div id="codeSnippetWrapper" style="border: 1px solid silver; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;">
<pre id="codeSnippet" style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;"><span style="color: #008000">-- Get Query Definition</span><span style="color: #0000ff">SELECT</span> OPRID, QRYNAME, DESCR, VERSION, LASTUPDDTTM, LASTUPDOPRID, QRYAPPROVED, CREATEOPRID,       CREATEDTTM,  QRYDISABLED,       QRYFOLDER, DESCRLONG  <span style="color: #0000ff">FROM</span> PSFSSYS.PSQRYDEFN    <span style="color: #0000ff">where</span> QRYNAME = <span style="color: #006080">'?'</span>    <span style="color: #0000ff">and</span> oprid = <span style="color: #006080">'?'</span><span style="color: #0000ff">with</span> ur;

<span style="color: #008000">-- Get Query Bind Variables</span><span style="color: #0000ff">SELECT</span> OPRID, QRYNAME, BNDNAME, BNDNUM, FIELDNAME, HDGTYPE, HEADING, FIELDTYPE       , LENGTH, DECIMALPOS, FORMAT, EDITTABLE, USECOUNT, USEEDIT  <span style="color: #0000ff">FROM</span> PSFSSYS.PSQRYBIND    <span style="color: #0000ff">where</span> QRYNAME <span style="color: #0000ff">like</span> <span style="color: #006080">'?%'</span>    <span style="color: #0000ff">and</span> oprid = <span style="color: #006080">'?'</span>    <span style="color: #0000ff">with</span> ur;

<span style="color: #008000">-- Get Query Criteria</span><span style="color: #0000ff">SELECT</span> OPRID, QRYNAME, SELNUM, CRTNUM, COMBTYPE, NEGATION, LPARENLVL,       LCRTSELNUM, LCRTFLDNUM, CONDTYPE, EXPRTYPE, R1CRTSELNUM, R1CRTFLDNUM,       R1CRTEXPNUM, R2CRTSELNUM, R2CRTFLDNUM, R2CRTEXPNUM, RPARENLVL,       QRYOJSELNUM  <span style="color: #0000ff">FROM</span> PSFSSYS.PSQRYCRITERIA    <span style="color: #0000ff">where</span> QRYNAME = <span style="color: #006080">'?'</span>    <span style="color: #0000ff">and</span> oprid = <span style="color: #006080">'?'</span><span style="color: #0000ff">with</span> ur;

<span style="color: #008000">-- Get Query Output Field Definitions</span><span style="color: #0000ff">SELECT</span> OPRID, QRYNAME, QRYFLDNAME, SELNUM, FLDNUM, RECNAME, FIELDNAME,       FLDRCDNUM, FLDEXPNUM, HDGTYPE, HEADING, COLUMNNUM, GROUPBYNUM,       ORDERBYNUM, ORDERBYDIR, TTLTYPE, SUBTTLNUM, USECOUNT, XLATTYPE,       XLATEXPRTYPE, XLATFLDNUM, XLATEXPNUM, AGGREGATEFUNC  <span style="color: #0000ff">FROM</span> PSFSSYS.PSQRYFIELD    <span style="color: #0000ff">where</span> QRYNAME  <span style="color: #0000ff">like</span> <span style="color: #006080">'?%'</span>     <span style="color: #0000ff">with</span> ur;</pre>
</div>
<p>If you have more information about this kind of handy SQLs – please comment and I will try and keep this post up to date.</p>
]]></content:encoded>
			<wfw:commentRss>http://workingscripts.com/2008/06/peoplesoft-components-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DB2 Space Management</title>
		<link>http://workingscripts.com/2008/03/db2-space-management/</link>
		<comments>http://workingscripts.com/2008/03/db2-space-management/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 21:52:00 +0000</pubDate>
		<dc:creator>Iouri Chadour</dc:creator>
				<category><![CDATA[DB2]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://workingscripts.com/?p=39</guid>
		<description><![CDATA[Here are some very useful utility SQLs that will allow you to understand your space usage, system and other useful stuff: DB2 Space Usage &#38; Status 1: -- to find tablespace status, type , usage run following SQL 2: select substr(tablespace_name,1,20) Tablespace_name, 3: case t.TBSPACETYPE 4: when 'S' then 'System Managed' 5: when 'D' then <a href='http://workingscripts.com/2008/03/db2-space-management/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Here are some very useful utility SQLs that will allow you to understand your space usage, system and other useful stuff:</p>
<p><strong>DB2 Space Usage &amp; Status</strong></p>
<div id="codeSnippetWrapper" style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 118.93%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: &#39;Courier New&#39;, courier, monospace; height: 210px; background-color: #f4f4f4; text-align: left">
<div id="codeSnippet" style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum1" style="color: #606060">   1:</span> -- <span style="color: #0000ff">to</span> find tablespace status, type , <span style="color: #0000ff">usage</span> run following <span style="color: #0000ff">SQL</span></pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum2" style="color: #606060">   2:</span> <span style="color: #0000ff">select</span> substr(tablespace_name,1,20) Tablespace_name, </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum3" style="color: #606060">   3:</span>     <span style="color: #0000ff">case</span> t.TBSPACETYPE </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum4" style="color: #606060">   4:</span>         <span style="color: #0000ff">when</span> <span style="color: #006080">'S'</span> <span style="color: #0000ff">then</span> <span style="color: #006080">'System Managed'</span></pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum5" style="color: #606060">   5:</span>         <span style="color: #0000ff">when</span> <span style="color: #006080">'D'</span> <span style="color: #0000ff">then</span> <span style="color: #006080">'Database managed'</span></pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum6" style="color: #606060">   6:</span>     <span style="color: #0000ff">end</span> <span style="color: #0000ff">as</span> TBSManaged, </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum7" style="color: #606060">   7:</span>     (used_pages/total_pages ) * 100 usedPCT, </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum8" style="color: #606060">   8:</span>     s.total_pages Total_pages, </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum9" style="color: #606060">   9:</span>     s.used_pages Used_pages, </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum10" style="color: #606060">  10:</span>     (s.total_pages - s.USABLE_PAGES ) Overhead_pgs, </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum11" style="color: #606060">  11:</span>     s.NUM_CONTAINERS No_of_containers,</pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum12" style="color: #606060">  12:</span>     s.free_pages Free_pages,</pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum13" style="color: #606060">  13:</span>     <span style="color: #0000ff">case</span> t.DATATYPE </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum14" style="color: #606060">  14:</span>         <span style="color: #0000ff">when</span> <span style="color: #006080">'A'</span> <span style="color: #0000ff">then</span> <span style="color: #006080">' ALL typ perm '</span></pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum15" style="color: #606060">  15:</span>         <span style="color: #0000ff">when</span> <span style="color: #006080">'L'</span>  <span style="color: #0000ff">then</span> <span style="color: #006080">' Large '</span></pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum16" style="color: #606060">  16:</span>         <span style="color: #0000ff">when</span> <span style="color: #006080">'T'</span>  <span style="color: #0000ff">then</span> <span style="color: #006080">' System Temp'</span></pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum17" style="color: #606060">  17:</span>         <span style="color: #0000ff">when</span> <span style="color: #006080">'U'</span>  <span style="color: #0000ff">then</span> <span style="color: #006080">' User Temp '</span></pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum18" style="color: #606060">  18:</span>     <span style="color: #0000ff">end</span> <span style="color: #0000ff">as</span> TBStype, </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum19" style="color: #606060">  19:</span>     <span style="color: #0000ff">case</span> s.TABLESPACE_STATE </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum20" style="color: #606060">  20:</span>         <span style="color: #0000ff">when</span> 0 <span style="color: #0000ff">then</span> <span style="color: #006080">' Normal '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum21" style="color: #606060">  21:</span>         <span style="color: #0000ff">when</span> 1 <span style="color: #0000ff">then</span> <span style="color: #006080">' Quiesced: SHARE '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum22" style="color: #606060">  22:</span>         <span style="color: #0000ff">when</span> 2 <span style="color: #0000ff">then</span> <span style="color: #006080">' Quiesced: UPDATE '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum23" style="color: #606060">  23:</span>         <span style="color: #0000ff">when</span> 4 <span style="color: #0000ff">then</span> <span style="color: #006080">' Quiesced: EXCLUSIVE '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum24" style="color: #606060">  24:</span>         <span style="color: #0000ff">when</span> 8 <span style="color: #0000ff">then</span> <span style="color: #006080">' Load pending '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum25" style="color: #606060">  25:</span>         <span style="color: #0000ff">when</span> 16 <span style="color: #0000ff">then</span> <span style="color: #006080">' Delete pending '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum26" style="color: #606060">  26:</span>         <span style="color: #0000ff">when</span> 32 <span style="color: #0000ff">then</span> <span style="color: #006080">' Backup pending '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum27" style="color: #606060">  27:</span>         <span style="color: #0000ff">when</span> 64 <span style="color: #0000ff">then</span> <span style="color: #006080">' Roll forward in progress '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum28" style="color: #606060">  28:</span>         <span style="color: #0000ff">when</span> 128 <span style="color: #0000ff">then</span> <span style="color: #006080">' Roll forward pending '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum29" style="color: #606060">  29:</span>         <span style="color: #0000ff">when</span> 256 <span style="color: #0000ff">then</span> <span style="color: #006080">' Restore pending '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum30" style="color: #606060">  30:</span>         <span style="color: #0000ff">when</span> 512 <span style="color: #0000ff">then</span> <span style="color: #006080">' Disable pending '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum31" style="color: #606060">  31:</span>         <span style="color: #0000ff">when</span> 1024 <span style="color: #0000ff">then</span> <span style="color: #006080">' Reorg in progress '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum32" style="color: #606060">  32:</span>         <span style="color: #0000ff">when</span> 2048 <span style="color: #0000ff">then</span> <span style="color: #006080">' Backup in progress '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum33" style="color: #606060">  33:</span>         <span style="color: #0000ff">when</span> 4096 <span style="color: #0000ff">then</span> <span style="color: #006080">' Storage must be defined '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum34" style="color: #606060">  34:</span>         <span style="color: #0000ff">when</span> 8192 <span style="color: #0000ff">then</span> <span style="color: #006080">' Restore in progress '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum35" style="color: #606060">  35:</span>         <span style="color: #0000ff">when</span> 16384 <span style="color: #0000ff">then</span> <span style="color: #006080">' Offline and not accessible '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum36" style="color: #606060">  36:</span>         <span style="color: #0000ff">when</span> 32768 <span style="color: #0000ff">then</span> <span style="color: #006080">' Drop pending '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum37" style="color: #606060">  37:</span>         <span style="color: #0000ff">when</span> 33554432 <span style="color: #0000ff">then</span> <span style="color: #006080">' Storage may be defined '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum38" style="color: #606060">  38:</span>         <span style="color: #0000ff">when</span> 67108864 <span style="color: #0000ff">then</span> <span style="color: #006080">' Storage Definition is in (final) state '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum39" style="color: #606060">  39:</span>         <span style="color: #0000ff">when</span> 134217728 <span style="color: #0000ff">then</span> <span style="color: #006080">' Storage Definition was changed prior to rollforward '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum40" style="color: #606060">  40:</span>         <span style="color: #0000ff">when</span> 268435456 <span style="color: #0000ff">then</span> <span style="color: #006080">' DMS rebalancer is active '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum41" style="color: #606060">  41:</span>         <span style="color: #0000ff">when</span> 536870912 <span style="color: #0000ff">then</span> <span style="color: #006080">' TBS deletion in progress '</span> </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum42" style="color: #606060">  42:</span>         <span style="color: #0000ff">when</span> 1073741824 <span style="color: #0000ff">then</span> <span style="color: #006080">' TBS creation in progress '</span> <span style="color: #0000ff">end</span> TABLESPACE_STATE </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum43" style="color: #606060">  43:</span> <span style="color: #0000ff">from</span> <span style="color: #0000ff">table</span>(snapshot_tbs_cfg(<span style="color: #006080">' '</span>,-1)) <span style="color: #0000ff">as</span> s, sysibm.systablespaces t <span style="color: #0000ff">where</span> s.tablespace_name = t.tbspace ;</pre>
<p><!--CRLF--></div>
</div>
<p><strong></strong></p>
<p><strong>DB2 Unused Space</strong></p>
<div id="codeSnippetWrapper" style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 128.25%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: &#39;Courier New&#39;, courier, monospace; height: 210px; background-color: #f4f4f4; text-align: left">
<div id="codeSnippet" style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum1" style="color: #606060">   1:</span> -- GETTING WASTED <span style="color: #0000ff">SPACE</span></pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum2" style="color: #606060">   2:</span> <span style="color: #0000ff">select</span> TBSPACE, ((80 - usedPCT) *  total_pages/100)*4/1000 SPACE_WASTED</pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum3" style="color: #606060">   3:</span> <span style="color: #0000ff">FROM</span></pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum4" style="color: #606060">   4:</span>     ( <span style="color: #0000ff">select</span> substr(tablespace_name,1,20) TBSPACE,</pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum5" style="color: #606060">   5:</span>         total_pages,</pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum6" style="color: #606060">   6:</span>         used_pages,</pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum7" style="color: #606060">   7:</span>         free_pages, </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum8" style="color: #606060">   8:</span>         (used_pages*100/total_pages )  usedPCT</pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum9" style="color: #606060">   9:</span>     <span style="color: #0000ff">from</span> <span style="color: #0000ff">table</span>(snapshot_tbs_cfg(<span style="color: #006080">' '</span>,-1)) <span style="color: #0000ff">as</span> tbs ) </pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span id="lnum10" style="color: #606060">  10:</span> <span style="color: #0000ff">AS</span> TABLE_SPACE</pre>
<p><!--CRLF--></p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span id="lnum11" style="color: #606060">  11:</span> <span style="color: #0000ff">WHERE</span> usedPCT &lt; 60</pre>
<p><!--CRLF--></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://workingscripts.com/2008/03/db2-space-management/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Non-Shared Temp Tables Cleanup</title>
		<link>http://workingscripts.com/2008/03/nonshared-temp-tables-cleanup/</link>
		<comments>http://workingscripts.com/2008/03/nonshared-temp-tables-cleanup/#comments</comments>
		<pubDate>Fri, 07 Mar 2008 22:26:00 +0000</pubDate>
		<dc:creator>Iouri Chadour</dc:creator>
				<category><![CDATA[PeopleSoft]]></category>
		<category><![CDATA[PeopleTools]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://workingscripts.com/?p=42</guid>
		<description><![CDATA[Some of the processes that depend on shared table instances , can experience a dramatic differences in performance, in case all of the instances available are being used, or remaining locked by some orphan or failed process. One way to resolve this problem is to go online and check if tables should be “released”. Here <a href='http://workingscripts.com/2008/03/nonshared-temp-tables-cleanup/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Some of the processes that depend on shared table instances , can experience a dramatic differences in performance, in case all of the instances available are being used, or remaining locked by some orphan or failed process. One way to resolve this problem is to go online and check if tables should be “released”. Here is a set of SQLs that would allow you to do the same thing and depending on you requirements – allow to automate this process, which could prove critical during the times of high usage:</p>
<div id="codeSnippetWrapper" style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4; text-align: left">
<pre id="codeSnippet" style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 99.49%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; height: 340px; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span style="color: #008000">-- Shared Temp Table instance control table</span><span style="color: #0000ff">SELECT</span>  * <span style="color: #0000ff">FROM</span> PS_TEMP_TBL_ASGNM<span style="color: #0000ff">WHERE</span> TEMP_TBL_NAME = <span style="color: #006080">'table_name'</span><span style="color: #0000ff">WITH</span> UR

<span style="color: #008000">-- Get tables that were locked by processes that ran 200 instance numbers before</span><span style="color: #0000ff">SELECT</span>  * <span style="color: #0000ff">FROM</span> PS_TEMP_TBL_ASGNM<span style="color: #0000ff">WHERE</span> in_use_sw = <span style="color: #006080">'Y'</span> <span style="color: #0000ff">AND</span> process_instance &lt; (<span style="color: #0000ff">SELECT</span> <span style="color: #0000ff">max</span> (prcsinstance) - 200                                                 <span style="color: #0000ff">FROM</span> psfssys.psprcsrqst                                                <span style="color: #0000ff">WHERE</span> runstatus = <span style="color: #006080">'9'</span>)<span style="color: #0000ff">with</span> ur

<span style="color: #008000">-- RELEASE ALL TEMP TABLE LOCKS </span><span style="color: #008000">-- FROM PROCESS INSTANCES THAT ARE LESS THAN 200 THAN THE LAST SUCCESSFUL ONE</span><span style="color: #0000ff">UPDATE</span> ps_temp_tbl_asgnm   <span style="color: #0000ff">SET</span> in_use_sw = <span style="color: #006080">'N'</span>, PROCESS_INSTANCE = 0<span style="color: #0000ff">WHERE</span> in_use_sw = <span style="color: #006080">'Y'</span> <span style="color: #0000ff">AND</span> process_instance  &lt; (<span style="color: #0000ff">SELECT</span> <span style="color: #0000ff">max</span> (prcsinstance) - 200                                                 <span style="color: #0000ff">FROM</span> psfssys.psprcsrqst                                                <span style="color: #0000ff">WHERE</span> runstatus = <span style="color: #006080">'9'</span>)

</pre>
<p></div>
<p>Let me know if you have any questions</p>
]]></content:encoded>
			<wfw:commentRss>http://workingscripts.com/2008/03/nonshared-temp-tables-cleanup/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>DB2 Scripts &#8211; Table Management</title>
		<link>http://workingscripts.com/2008/03/db2-table-management/</link>
		<comments>http://workingscripts.com/2008/03/db2-table-management/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 01:39:00 +0000</pubDate>
		<dc:creator>Iouri Chadour</dc:creator>
				<category><![CDATA[DB2]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://workingscripts.com/?p=45</guid>
		<description><![CDATA[Here are a few more nice DB2 scripts that would save you time: Get all tables in Table Space -- Get all tables in particular tablespaceselect SUBSTR(TABNAME,1,25) &#34;TABNAME&#34;, SUBSTR(TABSCHEMA,1,15) &#34;SCHEMA&#34;, NPAGES, CARD from syscat.tables where tbspace = '?' Generate Grants for all tables in Table Space -- Genereating GRANTS SELECT 'grant select on ' &#124;&#124; <a href='http://workingscripts.com/2008/03/db2-table-management/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Here are a few more nice DB2 scripts that would save you time:</p>
<p><strong>Get all tables in Table Space</strong></p>
<div id="codeSnippetWrapper" style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4; text-align: left">
<pre id="codeSnippet" style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span style="color: #008000">-- Get all tables in particular tablespace</span><span style="color: #0000ff">select</span> SUBSTR(TABNAME,1,25) &quot;TABNAME&quot;, SUBSTR(TABSCHEMA,1,15) &quot;<span style="color: #0000ff">SCHEMA</span>&quot;, NPAGES, CARD <span style="color: #0000ff">from</span> syscat.tables <span style="color: #0000ff">where</span> tbspace = <span style="color: #006080">'?'</span></pre>
<p></div>
<p><strong>Generate Grants for all tables in Table Space</strong></p>
<div id="codeSnippetWrapper" style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4; text-align: left">
<pre id="codeSnippet" style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span style="color: #008000">-- Genereating GRANTS </span><span style="color: #0000ff">SELECT</span> <span style="color: #006080">'grant select on '</span> || tabname || <span style="color: #006080">' to PSFDEV'</span> || <span style="color: #006080">';'</span>  <span style="color: #0000ff">FROM</span> syscat.tables <span style="color: #0000ff">WHERE</span> tabname <span style="color: #0000ff">NOT</span> <span style="color: #0000ff">IN</span> (<span style="color: #0000ff">SELECT</span> tabname                         <span style="color: #0000ff">FROM</span> syscat.tabauth                        <span style="color: #0000ff">WHERE</span> grantee = <span style="color: #006080">'PSFDEV'</span>)   <span style="color: #0000ff">AND</span> tabschema = <span style="color: #006080">'PSFSSYS'</span>   <span style="color: #0000ff">AND</span> (type = <span style="color: #006080">'T'</span> <span style="color: #0000ff">OR</span> type = <span style="color: #006080">'V'</span>)</pre>
<p></div>
]]></content:encoded>
			<wfw:commentRss>http://workingscripts.com/2008/03/db2-table-management/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

