<?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>PSST0101</title>
	<atom:link href="http://psst0101.digitaleagle.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://psst0101.digitaleagle.net</link>
	<description>Just Trying to Remember and Share What I Learn in the PeopleSoft World</description>
	<lastBuildDate>Thu, 17 May 2012 11:58:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Basic Steps to Create an Application Engine in PeopleSoft</title>
		<link>http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/</link>
		<comments>http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/#comments</comments>
		<pubDate>Thu, 17 May 2012 11:58:45 +0000</pubDate>
		<dc:creator>digitaleagle</dc:creator>
				<category><![CDATA[App Engine]]></category>

		<guid isPermaLink="false">http://psst0101.digitaleagle.net/?p=1941</guid>
		<description><![CDATA[In reviewing my statistics, I found that one common search was &#8220;basics steps to create an appengine in PeopleSoft&#8221;.  I hope the person(s) found what they were looking for on my blog.  Nonetheless, that gave me the idea to write a simple overview on creating a new Application Engine program. This post can&#8217;t cover everythinkg [...]<hr /><script type="text/javascript"><!--\ngoogle_ad_client = "ca-pub-0150736232923269";\n/* PSST0101 Bottom Ads */\ngoogle_ad_slot = "3671384318";\ngoogle_ad_width = 468;\ngoogle_ad_height = 60;\n//-->\n</script>\n<script type="text/javascript"\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\n</script><hr />]]></description>
			<content:encoded><![CDATA[<p>In reviewing my statistics, I found that one common search was &#8220;basics steps to create an appengine in PeopleSoft&#8221;.  I hope the person(s) found what they were looking for on my blog.  Nonetheless, that gave me the idea to write a simple overview on creating a new Application Engine program.</p>
<p>This post can&#8217;t cover everythinkg but I do plan to cover:</p>
<ul>
<li>Creating a new Application Engine definition</li>
<li>Setting program properties</li>
<li>Understanding program flow</li>
<li>Inserting new sections, steps, and actions</li>
<li>Loops/logic</li>
<li>State records</li>
<li>Adding programs to projects</li>
<li>Where to go from here</li>
</ul>
<p><span id="more-1941"></span></p>
<h3>Creating a new Application Engine Definition</h3>
<p>Application Engine programs are definitions that are created and edited within Application Designer.  So, open Application Designer and log in.  Next, either use the File &gt; New menu, press Ctrl + N, or click on the &#8220;New&#8221; icon on the toolbar.</p>
<p>File &gt; New / Ctrl + N:</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_303/" rel="attachment wp-att-1942"><img class="alignnone size-full wp-image-1942" title="File, New or Ctrl N" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_303.png?9d7bd4" alt="" width="417" height="163" /></a></p>
<p>New icon on the toolbar:</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_304/" rel="attachment wp-att-1943"><img class="alignnone size-full wp-image-1943" title="New Icon" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_304.png?9d7bd4" alt="" width="447" height="158" /></a></p>
<p>After you do that, you should get a New dialog.  There is where you tell Application Designer what type of new object you want to create.  From here, you will want to choose the &#8220;App Engine Program&#8221; object type.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_305/" rel="attachment wp-att-1944"><img class="alignnone size-full wp-image-1944" title="Choosing the App Engine Program Definition Type" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_305.png?9d7bd4" alt="" width="339" height="218" /></a></p>
<p>This should give you a new Application Engine program window:</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_306/" rel="attachment wp-att-1947"><img class="alignnone  wp-image-1947" title="New App Engine Program" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_306.png?9d7bd4" alt="" width="524" height="215" /></a></p>
<p>You probably want to save your program as you go.  You can use File &gt; Save or Ctrl + S or the Save icon on the toolbar.  The first save will prompt you for a name for your new program:</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_308/" rel="attachment wp-att-1950"><img class="alignnone size-full wp-image-1950" title="Save Dialog" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_308.png?9d7bd4" alt="" width="252" height="120" /></a></p>
<h3>Settings Program Properties</h3>
<p>The first thing you need to do is set your properties.  If nothing else, you need to check the &#8220;Disable Restart&#8221; button.  So, click on the properties button on the toolbar.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_311/" rel="attachment wp-att-1953"><img class="alignnone size-full wp-image-1953" title="Properties Button" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_311.png?9d7bd4" alt="" width="319" height="75" /></a></p>
<p>On the first tab of the properties, you should enter a general description of your program.  In the comments area, you want to describe in more detail what your program does.  You should also enter the date, author, and description of changes to the program throughout it&#8217;s lifetime.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_312/" rel="attachment wp-att-1954"><img class="alignnone  wp-image-1954" title="Program Properties General tab" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_312.png?9d7bd4" alt="" width="244" height="288" /></a></p>
<p>Read on for more information about State Records later, but the State Records tab is where you connect the state record with your program.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_313/" rel="attachment wp-att-1955"><img class="alignnone  wp-image-1955" title="Program Properties State Record tab" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_313.png?9d7bd4" alt="" width="245" height="287" /></a></p>
<p>This is the most important property to set.  On the fourth tab, make sure to check the disable restart option.  In my opinion, this should be default.  I don&#8217;t have room to go into all of the reasons, but let&#8217;s just say that in order to make a program restartable, you need to make several design decisions first.  If you want your program restartable, get it running first, check that your design is restartable, and then, come back here and uncheck the disable restart option.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_314-2/" rel="attachment wp-att-1957"><img class="alignnone  wp-image-1957" title="Program Properties Advanced tab" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_3141.png?9d7bd4" alt="" width="244" height="290" /></a></p>
<h3>Understanding Program Flow</h3>
<p>The first that you need to understand is what the parts mean and how it runs each piece.  So, here are the parts:</p>
<ul>
<li>Program: a complete application (or a library of functions)</li>
<li>Section: like a function in a regular language</li>
<li>Step: a single task; like a line of code in a regular language</li>
<li>Action: a single action; like a clause in a regular language</li>
</ul>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_309/" rel="attachment wp-att-1951"><img class="alignnone  wp-image-1951" title="AE Program Parts" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_309.png?9d7bd4" alt="" width="524" height="309" /></a></p>
<p>The most important thing to understand is that the program starts at the first step in the &#8220;MAIN&#8221; section.  It runs to the last step of the MAIN section in sequence.  At the last step, the program is done.  The other sections do not run unless they are explicitly called with a &#8220;Call Section&#8221; action.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_310/" rel="attachment wp-att-1952"><img class="alignnone  wp-image-1952" title="Program Flow" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_310.png?9d7bd4" alt="" width="524" height="309" /></a></p>
<p>Don&#8217;t let the names of the steps confuse you.  The name can be anything.  The step sequence number (circled below) is what controls the order of the steps.  If you&#8217;re not careful, the step names can confuse you.  In the following example, step02 runs first before step01.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_315/" rel="attachment wp-att-1958"><img class="alignnone  wp-image-1958" title="Confusing Step Names" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_315.png?9d7bd4" alt="" width="436" height="244" /></a></p>
<p>Also, you can&#8217;t control the order of the actions.  You should have only one action per step unless you are doing looping.  If you do insert two actions into the same step, you can hit the refresh button on the toolbar and it will rearrange the actions in the order in which they will execute.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_316/" rel="attachment wp-att-1965"><img class="alignnone size-full wp-image-1965" title="Refresh button on the toolbar" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_316.png?9d7bd4" alt="" width="544" height="95" /></a></p>
<h3>Inserting New Sections, Steps, and Actions</h3>
<p>These three buttons on the toolbar insert new sections, steps, and actions (respectively).  You can also use the insert menu.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_317/" rel="attachment wp-att-1966"><img class="alignnone size-full wp-image-1966" title="Insert buttons" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_317.png?9d7bd4" alt="" width="544" height="95" /></a></p>
<p>The part of the program you have selected is significant when inserting a new part.  When inserting a section, you used to have to select the previous section.  Also, the order of the sections does not matter, so once you hit the Refresh button it will alphabetize them by their name.  (Remember sections run in the order they are called from MAIN.)</p>
<p>To insert a step, select the step before, and it will insert the new step after what you have selected.  The program will never change the order of the steps.  If you want to reorder them, you have to cut and paste them in the new location.</p>
<p>To insert an action, select the action or step before, and it will insert the new action afterward.  Again, remember that you can&#8217;t control the order of the actions.  After you insert the action, you will need to change the type in the drop down:</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_319/" rel="attachment wp-att-1967"><img class="alignnone size-full wp-image-1967" title="Changing the Action Type" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_319.png?9d7bd4" alt="" width="485" height="195" /></a></p>
<p>For most of the actions, you will want to double click on the grey area of the action and open the PeopleCode or SQL editor.  This is what defines exactly what the action does.</p>
<h3>Loops/Logic</h3>
<p>Complex logic is best done inside of PeopleCode steps.  Note that you can have an App Engine program with a single PeopleCode step/action.  The PeopleCode can do all of the work for you.</p>
<p>That being said, you can do some logic flow with looping and such in the App Engine itself. This is accomplished with the following action types:</p>
<ul>
<li>Do Select: like a for loop, loops through a set of rows</li>
<li>Do While: like a while loop</li>
<li>Do When: like an if statement</li>
<li>Call Section: branches to another section</li>
</ul>
<div>First, let&#8217;s talk about <strong>Do Select</strong>.  It is compared to a &#8220;for&#8221; loop in other programming languages.  Really, it is looping through a result set of rows returned by a select statement.  So, you&#8217;ll define a SQL statement for the Do Select action.  The program will execute the statement and execute the following actions <strong>in the step</strong> for each row returned.</div>
<div><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_320/" rel="attachment wp-att-1972"><img class="alignnone size-full wp-image-1972" title="Do Select flow" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_320.png?9d7bd4" alt="" width="684" height="243" /></a></div>
<div>Keep in mind that you can only have one of each action type with each step.  If you need to execute two SQL statements for each row, you will have to create a new section with those SQL actions and use a Call Section with your Do Select.</div>
<p>Next, the <strong>Do While</strong> loop will go until no rows are returned.  It is similar to the Do Select except that it executes the SQL statement every iteration.  The actions following it are executed when the SQL statement returns 1 or more rows.  Also, note that the actions are executed once for each time the select statement is run no matter how many rows are returned.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_322/" rel="attachment wp-att-1978"><img class="alignnone size-full wp-image-1978" title="Do While Loop" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_322.png?9d7bd4" alt="" width="679" height="240" /></a></p>
<p>Now, the Do When action is like an If statement.  Basically, if the select statement returns a row, that&#8217;s true.  If no rows result, it&#8217;s false.  So, if the Do When select statement returns a row or more, it executes the action.  If no rows are returned, it moves on to the next Step without running any more actions in the current step.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_324/" rel="attachment wp-att-1981"><img class="alignnone size-full wp-image-1981" title="Do When logic" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_324.png?9d7bd4" alt="" width="679" height="240" /></a></p>
<p>Finally, the <strong>Call Section</strong> action is simple: it just runs all the steps in the selected section and comes back to the next step.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_325/" rel="attachment wp-att-1982"><img class="alignnone size-full wp-image-1982" title="Call Section" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_325.png?9d7bd4" alt="" width="782" height="366" /></a></p>
<h3>State Records</h3>
<p>Now, you have the program flow mastered, but you need to know how to pass information between the steps.  The State Record is your tool.  If you are familiar with COBOL, the state record is like the working storage area on a COBOL program.  Or, you could say that the state record is the variables for the App Engine program.</p>
<p>So, to create a state record, you just need to create a new record with a name that ends with &#8220;AET&#8221;.  You can create a new record the same way as you created the App Engine definition.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_326/" rel="attachment wp-att-1983"><img class="alignnone size-full wp-image-1983" title="Creating a New Record" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_326.png?9d7bd4" alt="" width="331" height="213" /></a></p>
<p>In your new record, you need to add at least three fields: PROCESS_INSTANCE, RUN_CNTRL_ID, and OPRID.  You can use the Insert &gt; Fields menu to add fields.  The PROCESS_INSTANCE should be a key.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_329/" rel="attachment wp-att-1984"><img class="alignnone size-full wp-image-1984" title="State Record Necessary Fields" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_329.png?9d7bd4" alt="" width="724" height="131" /></a></p>
<p>Next, on the record type tab, you should either select Derived/Work or you should select SQL Table.  If you choose SQL Table, you will need to go through the Build process when you create and each time you change the record.  If you use Derived/Work, you may loose the information in the state record when the program commits (which is no problem if the only commit you have is at the end).</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_330/" rel="attachment wp-att-1985"><img class="alignnone  wp-image-1985" title="Record Type of the State Record" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_330.png?9d7bd4" alt="" width="316" height="195" /></a></p>
<p>Now, when you save it, make sure that you add the &#8220;AET&#8221; to the end of the name.  You will not be able to select it on the State Record screen unless it is named appropriately.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_331/" rel="attachment wp-att-1986"><img class="alignnone size-full wp-image-1986" title="Saving the State Record" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_331.png?9d7bd4" alt="" width="252" height="115" /></a></p>
<p>Once you have the state record saved, you need to connect it to the App Engine program.  To do so, open the App Engine properties and go to the State Record tab.  Enter the name of the state record in the search box, click the &#8220;Get List&#8221; button, select the record in the &#8220;Record List&#8221;, and finally click the &#8220;Add&#8221; button.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_332/" rel="attachment wp-att-1989"><img class="alignnone  wp-image-1989" title="State Record tab" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_332.png?9d7bd4" alt="" width="245" height="286" /></a></p>
<p>Finally, we can use our state record in our program.  With SQL statements, we can use two different meta-sql commands:</p>
<ul>
<li>%Select: loads a value selected from the database into the state record</li>
<li>%Bind: places a value from the state record into a SQL statement</li>
</ul>
<div><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_337/" rel="attachment wp-att-1992"><img class="alignnone size-full wp-image-1992" title="State Record Meta-SQL" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_337.png?9d7bd4" alt="" width="606" height="221" /></a></div>
<p>For example, the <strong>%Select</strong> in this statement will read the EMPLID returned by the select statement and place it in the state record.  Because this is a Do Select, it will fetch each row and run the rest of the actions in the step for each row.  When the action runs the first time, the EMPLID field in the state record will have the EMPLID from the first row as the actions run.  The state record will have the EMPLID from row 2 as the actions run the second time, and so on.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_338/" rel="attachment wp-att-1993"><img class="alignnone size-full wp-image-1993" title="%Select" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_338.png?9d7bd4" alt="" width="714" height="229" /></a></p>
<p>This next example uses <strong>%Bind</strong> to pull the value from the state record and insert it into a staging table.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_339/" rel="attachment wp-att-1994"><img class="alignnone size-full wp-image-1994" title="%Bind example" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_339.png?9d7bd4" alt="" width="757" height="249" /></a></p>
<p>Also, in PeopleCode steps, you can refer to the state record with the Record.Field syntax.  If you are familiar with PeopleCode on a page, you understand the buffer.  The buffer for a PeopleCode program in App Engine is your state record, and you access them as if they were in the buffer.</p>
<h3>Running/Testing</h3>
<p>The easiest, quickest way to test your new program is to run it from Application Designer.  When you have the main App Engine window active, you can click the Run button.  You can also use the Edit &gt; Run Program&#8230; menu.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_342/" rel="attachment wp-att-1995"><img class="alignnone size-full wp-image-1995" title="Run App Engine Toolbar Button" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_342.png?9d7bd4" alt="" width="559" height="83" /></a></p>
<p>This opens the Run Dialog window.  You want to make sure that you select Output Log to File.  If you don&#8217;t, the window will close and you won&#8217;t be able to see any of the output.  I also uncheck the Run Minimized option so that I can see the window open and close more easily.  Pay attention to the Log File Name because the first thing you want to do when it is done is view the output.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_343/" rel="attachment wp-att-1996"><img class="alignnone  wp-image-1996" title="Run App Engine Dialog" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_343.png?9d7bd4" alt="" width="235" height="196" /></a></p>
<p>You will eventually want to set most programs up to run online from a Run Control.  Creating a run control is outside of the scope of this post, but here are some thoughts that might help you toward that direction:</p>
<ul>
<li>You will need to create a page with the process scheduler sub page on it and a component containing the page.</li>
<li>You will need to create a Process definition where the Process Type is application engine and the name is the same name as your program.</li>
<li>You will need to enter the new component name on the Process Definition and select a Process Group that you have access to.</li>
<li>When your program starts, PeopleTools will automatically populate the Process Instance, Operator ID, and Run Control ID fields for you.</li>
<li>One of the first steps in your program will be to select the parameters from your run control page into your state record.  You will use the Run Control ID and Operator ID that is pre-populated to get the correct values.</li>
</ul>
<h3>Adding Programs to Projects</h3>
<p>As you create your program, you should be adding it to a project.  This ensures that once you have it working, you can easily migrate it to your test environment and eventually to production.  The catch is that the program has different parts that must be inserted individually.  The program as a whole must be in the project.  Each section must go into the project, as well as each individual SQL or PeopleCode program.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_344/" rel="attachment wp-att-1997"><img class="alignnone  wp-image-1997" title="Inserting App Engines into Projects" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_344.png?9d7bd4" alt="" width="598" height="245" /></a></p>
<p>You run into problems when you miss a part.  App Designer cannot migrate a child definition if the parent definition does not exist in the target.  For example, you can&#8217;t migrate any sections if the parent App Engine program does not exist in your target environment.  You can&#8217;t migrate a Do Select SQL statement if the section with the parent step/action does not exist in the target.</p>
<p>As you go, I recommend using the F7 key to insert everything your create or change as you do it.  This ensures you don&#8217;t forget anything.  When you create a new section, you can right click on the section and insert it into the project:</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_345/" rel="attachment wp-att-1998"><img class="alignnone  wp-image-1998" title="Inserting a Section into a Project" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_345.png?9d7bd4" alt="" width="226" height="256" /></a></p>
<p>Assuming you want all of the program and its parts in your project, you can use the insert related definitions option.  Remember, you only want to do this when you created the program by yourself.  If you only modified some of the parts, you only want the parts in your project that you actually changed.  To, use the option, press Ctrl + F7 or use the Insert &gt; Definitions Into Project.  Before you insert the program into the project, highlight all of the Related Definitions.</p>
<p><a href="http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/selection_346/" rel="attachment wp-att-1999"><img class="alignnone  wp-image-1999" title="Inserting Related Definitions Into the Project" src="http://psst0101.digitaleagle.net/wp-content/uploads/2012/05/Selection_346.png?9d7bd4" alt="" width="335" height="247" /></a></p>
<h3>Where To Go From Here</h3>
<p>Here are some other articles that I have written that might be helpful:</p>
<ul>
<li><a title="Step-by-Step: App Engine for Testing PeopleCode" href="http://psst0101.digitaleagle.net/2010/07/27/step-by-step-app-engine-for-testing-peoplecode/">Step-by-Step: App Engine for Testing PeopleCode</a></li>
<li><a title="PeopleTools Tip — App Engine Restart If you get …" href="http://psst0101.digitaleagle.net/2006/10/03/peopletools-tip-app-engine-restart-if-you-get/">PeopleTools Tip: App Engine Restart</a> (If you forget to check Disable Restart)</li>
</ul>
<p>Here are some other places you might want to look as well:</p>
<ul>
<li><a href="http://docs.oracle.com/cd/E28394_01/pt852pbh1/eng/psbooks/tape/book.htm" target="_blank">PeopleBooks: Application Engine</a></li>
<li><a href="http://peoplesoft.wikidot.com/application-engine" target="_blank">PeopleSoft Wiki: Application Engine</a></li>
<li><a href="http://peoplesofttipster.com/2007/05/22/state-records-and-missing-data/" target="_blank">PeopleSoft Tipster: State Records and Missing Data</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpsst0101.digitaleagle.net%2F2012%2F05%2F17%2Fbasic-steps-to-create-an-application-engine-in-peoplesoft%2F&amp;title=Basic%20Steps%20to%20Create%20an%20Application%20Engine%20in%20PeopleSoft" id="wpa2a_2"><img src="http://psst0101.digitaleagle.net/wp-content/plugins/add-to-any/share_save_171_16.png?9d7bd4" width="171" height="16" alt="Share"/></a></p><script type="text/javascript"><!--
google_ad_client = "ca-pub-0150736232923269";
/* PSST0101 Bottom Ads */
google_ad_slot = "3671384318";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>]]></content:encoded>
			<wfw:commentRss>http://psst0101.digitaleagle.net/2012/05/17/basic-steps-to-create-an-application-engine-in-peoplesoft/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle DBA: Public Synonyms</title>
		<link>http://psst0101.digitaleagle.net/2012/05/14/oracle-dba-public-synonyms/</link>
		<comments>http://psst0101.digitaleagle.net/2012/05/14/oracle-dba-public-synonyms/#comments</comments>
		<pubDate>Mon, 14 May 2012 21:47:59 +0000</pubDate>
		<dc:creator>digitaleagle</dc:creator>
				<category><![CDATA[Oracle DBA]]></category>

		<guid isPermaLink="false">http://psst0101.digitaleagle.net/?p=1797</guid>
		<description><![CDATA[Recently, I wrote about granting read only access to the database for developers.  Tim Hall commented that my solution was insecure and granted too much, possibly allowing a loophole.  At the same time, I recently wanted to provide public synonyms to users. So, the following role, procedures, and trigger attempt to accomplish those two goals: [...]<hr /><script type="text/javascript"><!--\ngoogle_ad_client = "ca-pub-0150736232923269";\n/* PSST0101 Bottom Ads */\ngoogle_ad_slot = "3671384318";\ngoogle_ad_width = 468;\ngoogle_ad_height = 60;\n//-->\n</script>\n<script type="text/javascript"\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\n</script><hr />]]></description>
			<content:encoded><![CDATA[<p>Recently, <a title="Creating a Readonly Database User" href="http://psst0101.digitaleagle.net/2012/02/16/creating-a-readonly-database-user/">I wrote</a> about granting read only access to the database for developers.  <a href="http://psst0101.digitaleagle.net/2012/02/16/creating-a-readonly-database-user/#comment-863">Tim Hall</a> commented that my solution was insecure and granted too much, possibly allowing a loophole.  At the same time, I recently wanted to provide public synonyms to users.</p>
<p>So, the following role, procedures, and trigger attempt to accomplish those two goals:</p>
<ul>
<li>Allow for securely granting readonly access</li>
<li>Automatically create public synonyms</li>
</ul>
<div><span id="more-1797"></span></div>
<div>First, I created a new custom role to use for readonly access.  Note that with this role, I am making the following assumption:</div>
<div>
<ul>
<li>Only developers/power users need access to the role</li>
<li>The developers/power users need access to all of the tables (we aren&#8217;t allowing for only particular groups of tables)</li>
<li>If we want to to restrict security, we will use PeopleSoft Query and not allow direct database access</li>
</ul>
<div>So, here&#8217;s how I created the role:</div>
</div>
<pre class="brush: sql; title: ; notranslate">
create role SKP_ReadOnly;
</pre>
<p>Now, I need a procedure that will both create synonyms and connect my role with a particular table.  The goal of this procedure is to accomplish any task that needs to happen to all tables in the system.  You could easily add extra roles or other tasks to this procedure as well.</p>
<p>The only parameter is the table that you want to &#8220;secure&#8221;.  Note that this &#8220;objname&#8221; is the actual table name with the &#8220;PS_&#8221; in front of it as opposed to the record name.</p>
<p>The first execute immediate creates the public synonym.  This allows any user to query the table without having to put the schema in front of it.  Without the synonym, every user has to put &#8220;sysadm.&#8221; in front of all of the PeopleSoft tables.</p>
<p>The second execute immediate gives &#8220;select&#8221; access to the SKP_ReadOnly role.  This attaches readonly access for that table to that role.</p>
<pre class="brush: sql; title: ; notranslate">
CREATE OR REPLACE PROCEDURE SKP_SecureTable (objname in varchar2) IS
begin
execute immediate 'create or replace public synonym ' || objname || ' for SYSADM.' || objname;
execute immediate 'grant select on SYSADM.' || objname || ' to SKP_ReadOnly';
end;
/
</pre>
<p>Next, I need to run the previous procedure against all of the existing tables.  This is a one-time deal for the most part, but I went ahead and created a procedure for it.  The procedure simply loops through all of the tables in the &#8220;SYSADM&#8221; schema and executes the previous procedure passing that table as the parameter.</p>
<pre class="brush: sql; title: ; notranslate">
create or replace procedure SKP_SecureAllTables is
 cursor tbls is select table_name from dba_tables where owner = 'SYSADM';
 tbl tbls%ROWTYPE;
begin
 open tbls;
 loop
 fetch tbls into tbl;
 exit when tbls%NOTFOUND;
 SKP_SecureTable(tbl.table_name);
 end loop;
 close tbls;
end;
/
</pre>
<p>Now, we just need to call the procedure.  This works on all of the existing tables.</p>
<pre class="brush: sql; title: ; notranslate">
call UP_SecureAllTables();
</pre>
<p>Finally, we need to handle new tables.  If you create any new records or even if you Alter any existing records, you will loose the synonym and the role connection.  Remember that when you alter an existing table in App Designer, it creates a new table with the new structure, copies the data from the old one, drops the old one, and renames to new one to the original name.  When it drops the table you loose your security.</p>
<p>So, this trigger fixes that problem.  Basically, any time a new table is created, it runs our original procedure to grant that table to the role and create the synonym.</p>
<pre class="brush: sql; title: ; notranslate">
create or replace
TRIGGER SKP_TableCreated_Trig
AFTER create ON database
declare
jobnum number;
BEGIN
IF ORA_DICT_OBJ_OWNER='SYSADM' THEN
 SYS.DBMS_JOB.SUBMIT (jobnum, 'SYS.SKP_SecureTable(''' || ORA_DICT_OBJ_NAME || ''');');
END IF;

END;
/
</pre>
<p>As always, if you have an issue with any of this, see anything incorrect, or know a better way, please comment!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpsst0101.digitaleagle.net%2F2012%2F05%2F14%2Foracle-dba-public-synonyms%2F&amp;title=Oracle%20DBA%3A%20Public%20Synonyms" id="wpa2a_4"><img src="http://psst0101.digitaleagle.net/wp-content/plugins/add-to-any/share_save_171_16.png?9d7bd4" width="171" height="16" alt="Share"/></a></p><script type="text/javascript"><!--
google_ad_client = "ca-pub-0150736232923269";
/* PSST0101 Bottom Ads */
google_ad_slot = "3671384318";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>]]></content:encoded>
			<wfw:commentRss>http://psst0101.digitaleagle.net/2012/05/14/oracle-dba-public-synonyms/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Moodle Update/Information</title>
		<link>http://psst0101.digitaleagle.net/2012/05/09/moodle-updateinformation/</link>
		<comments>http://psst0101.digitaleagle.net/2012/05/09/moodle-updateinformation/#comments</comments>
		<pubDate>Wed, 09 May 2012 21:04:12 +0000</pubDate>
		<dc:creator>digitaleagle</dc:creator>
				<category><![CDATA[3rd Party Integrations]]></category>

		<guid isPermaLink="false">http://psst0101.digitaleagle.net/?p=1923</guid>
		<description><![CDATA[In catching up on my blog reading, I came across this link: e-Literate: The Blackboard Announcements, Part 2: Can Open Source Be Bought? Apparently, I have been out of the loop a little in the LMS arena.  This article was a great explanation of how things work in the open source world of LMS. Here&#8217;s some [...]<hr /><script type="text/javascript"><!--\ngoogle_ad_client = "ca-pub-0150736232923269";\n/* PSST0101 Bottom Ads */\ngoogle_ad_slot = "3671384318";\ngoogle_ad_width = 468;\ngoogle_ad_height = 60;\n//-->\n</script>\n<script type="text/javascript"\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\n</script><hr />]]></description>
			<content:encoded><![CDATA[<p>In catching up on my blog reading, I came across this link:</p>
<p><a href="http://mfeldstein.com/the-blackboard-announcements-part-2-can-open-source-be-bought/" target="_blank">e-Literate: The Blackboard Announcements, Part 2: Can Open Source Be Bought?</a></p>
<p>Apparently, I have been out of the loop a little in the LMS arena.  This article was a great explanation of how things work in the open source world of LMS.</p>
<p>Here&#8217;s some of the other reading that I did to catch up.  First, I started with the official announcement from Blackboard itself:</p>
<p><a href="http://www.blackboard.com/About-Bb/News-Center/Press-Releases.aspx?releaseid=1676738" target="_blank">Blackboard Press Releases: Blackboard Acquires Moodlerooms, Netspot</a></p>
<p>The following article was pretty interesting.  It made me wonder if this is similar to the situation with Oracle and Open Office.  The community didn&#8217;t like Oracle and moved to Libre Office.  I haven&#8217;t followed that situation very closely other than the fact that my Ubuntu installation uses Libre Office now instead of Open Office, but it sounds like the same process could happen  in the LMS world if Blackboard isn&#8217;t careful.</p>
<p><a href="http://www.hackeducation.com/2012/03/26/blackboard-moodlerooms-open-washing/" target="_blank">Hack Education: You Can Acquire Open Source Companies, But You Can&#8217;t Buy Open Source Community</a></p>
<p>This article caught my eye also.  How necessary is the LMS?  This article explores how Google Apps is meeting the needs for what users were using LMS systems for.  This may be something that Blackboard is trying to fight.</p>
<p><a href="http://mfeldstein.com/google-apps-for-education-when-will-it-replace-the-lms/" target="_blank">e-Literate: Google Apps for Education: When Will It Replace the LMS?</a></p>
<p>Campus Technology seems to be going down this route.  They are integrating with Google Apps.</p>
<p><a href="http://campustechnology.com/articles/2011/10/13/pearson-debuts-free-lms-with-google-apps-integration.aspx" target="_blank">Campus Technology: Pearson Debuts Free LMS with Google Apps Integration</a></p>
<p>Another thing that is obvious is how controversial these announcements/actions are.  This forum gives you a small glimpse:</p>
<p><a href="http://moodle.org/mod/forum/discuss.php?d=199248" target="_blank">Moodle Forum: Blackboard acquires Moodlerooms and NetSpot</a></p>
<p>The one thing that stood out to me from multiple articles is the recognition of Blackboard swinging toward the service end of LMS.  To me, the idea makes sense.  I have worked with enough professionals in the Education arena enough to know that they can be very opinionated in the software they use.  Furthermore, they don&#8217;t always agree on what is best.  I have run across a number of Universities that offer multiple LMS options and the instructors can choose what they want to use.  If I were Blackboard, I think I could easily come to the decision: why fight it?  Instead of trying to build the best LMS system, let&#8217;s just support all of them and make money on the support side.</p>
<p>For me, the big thing to watch is the PeopleSoft integration to Moodle.  I know that PeopleSoft has been working on the Student Administration Integration Pack.  I am curious to see if Blackboard&#8217;s entry into the Moodle world furthers the cause for Moodle and PeopleSoft integration.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpsst0101.digitaleagle.net%2F2012%2F05%2F09%2Fmoodle-updateinformation%2F&amp;title=Moodle%20Update%2FInformation" id="wpa2a_6"><img src="http://psst0101.digitaleagle.net/wp-content/plugins/add-to-any/share_save_171_16.png?9d7bd4" width="171" height="16" alt="Share"/></a></p><script type="text/javascript"><!--
google_ad_client = "ca-pub-0150736232923269";
/* PSST0101 Bottom Ads */
google_ad_slot = "3671384318";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>]]></content:encoded>
			<wfw:commentRss>http://psst0101.digitaleagle.net/2012/05/09/moodle-updateinformation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle DBA: Running DBVerify on all files</title>
		<link>http://psst0101.digitaleagle.net/2012/04/25/oracle-dba-running-dbverify-on-all-files/</link>
		<comments>http://psst0101.digitaleagle.net/2012/04/25/oracle-dba-running-dbverify-on-all-files/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 00:59:19 +0000</pubDate>
		<dc:creator>digitaleagle</dc:creator>
				<category><![CDATA[Oracle DBA]]></category>

		<guid isPermaLink="false">http://psst0101.digitaleagle.net/?p=1791</guid>
		<description><![CDATA[One of the steps to a PeopleTools Upgrade is running a database verify.  In Oracle, that means using the dbv program. Unfortunately, I didn&#8217;t see a &#8220;check the whole database&#8221; option.  So, I had to create a way to run it for each file&#8230; I ran this in the database: Note: you will have to [...]<hr /><script type="text/javascript"><!--\ngoogle_ad_client = "ca-pub-0150736232923269";\n/* PSST0101 Bottom Ads */\ngoogle_ad_slot = "3671384318";\ngoogle_ad_width = 468;\ngoogle_ad_height = 60;\n//-->\n</script>\n<script type="text/javascript"\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\n</script><hr />]]></description>
			<content:encoded><![CDATA[<p>One of the steps to a PeopleTools Upgrade is running a database verify.  In Oracle, that means using the dbv program.</p>
<p>Unfortunately, I didn&#8217;t see a &#8220;check the whole database&#8221; option.  So, I had to create a way to run it for each file&#8230;</p>
<p>I ran this in the database:</p>
<pre class="brush: sql; title: ; notranslate">

select 'dbv file=' || file_name
 || ' blocksize='
 || (select value from v$parameter where name = 'db_block_size')
 || ' logfile=E:\psca\output\dbv\' || tablespace_name || '.txt'
from SYS.dba_data_files;
</pre>
<p><strong>Note</strong>: you will have to change the path for the logfile.</p>
<p>Then, you can copy the contents of that file and run it on the command line.</p>
<p>Please comment if you have a better suggestion!</p>
<h3>Resources</h3>
<ul>
<li><a href="http://www.adp-gmbh.ch/ora/misc/dynamic_performance_views.html" target="_blank">Oracle&#8217;s V$ Views</a></li>
<li><a href="http://docs.oracle.com/cd/B10501_01/server.920/a96652/ch13.htm" target="_blank">Oracle9i Database Utilities: 13 DBVERIFY: Offline Database Verification Utility</a></li>
<li><a href="http://www.dba-oracle.com/tips_oracle_dbv_verify.htm" target="_blank">Burleson Consulting: About the Oracle dbvverify Utility</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpsst0101.digitaleagle.net%2F2012%2F04%2F25%2Foracle-dba-running-dbverify-on-all-files%2F&amp;title=Oracle%20DBA%3A%20Running%20DBVerify%20on%20all%20files" id="wpa2a_8"><img src="http://psst0101.digitaleagle.net/wp-content/plugins/add-to-any/share_save_171_16.png?9d7bd4" width="171" height="16" alt="Share"/></a></p><script type="text/javascript"><!--
google_ad_client = "ca-pub-0150736232923269";
/* PSST0101 Bottom Ads */
google_ad_slot = "3671384318";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>]]></content:encoded>
			<wfw:commentRss>http://psst0101.digitaleagle.net/2012/04/25/oracle-dba-running-dbverify-on-all-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Troubleshooting COBOL Problem</title>
		<link>http://psst0101.digitaleagle.net/2012/03/22/troubleshooting-cobol-problem/</link>
		<comments>http://psst0101.digitaleagle.net/2012/03/22/troubleshooting-cobol-problem/#comments</comments>
		<pubDate>Fri, 23 Mar 2012 02:09:41 +0000</pubDate>
		<dc:creator>digitaleagle</dc:creator>
				<category><![CDATA[COBOL]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://psst0101.digitaleagle.net/?p=1338</guid>
		<description><![CDATA[Here&#8217;s another problem that I ran into &#8230; COBOL wouldn&#8217;t run. Even the simple test didn&#8217;t work. In researching, I found this in my SCHDLR log file. So, I took the command line from the file, and I tried to run it in a command window. Here&#8217;s what happened: On the PeopleSoft Wiki, I found [...]<hr /><script type="text/javascript"><!--\ngoogle_ad_client = "ca-pub-0150736232923269";\n/* PSST0101 Bottom Ads */\ngoogle_ad_slot = "3671384318";\ngoogle_ad_width = 468;\ngoogle_ad_height = 60;\n//-->\n</script>\n<script type="text/javascript"\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\n</script><hr />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s another problem that I ran into &#8230;</p>
<p>COBOL wouldn&#8217;t run. Even the simple test didn&#8217;t work.</p>
<p><span id="more-1338"></span></p>
<p>In researching, I found this in my SCHDLR log file.</p>
<pre class="brush: plain; title: ; notranslate">
    Server: PSNT checking status...
    Server action mode: Submitting request
    Number of New Process Request(s) To Start: 1
    Process Instance: 1236 started
    Starting process:  1236
         Process Name: PTPDBTST
         Process Type: COBOL SQL
        Command Line:  C:\pshome\hcm89\CBLBINA\PTPDBTST.EXE
        Parm List:     ORACLE/HCM89/PS/OPRPSWD/SCR/1236//0
        Working Dir:   E:\oracle\11.1.0\client
         Session Id:   2656
    Server: PSNT checking status...
    Server action mode: Ok (looking for requests)
    Server: PSNT looking for work
    Checking Process cancels...
 =================================Error===============================
    Process 1236 is marked 'Initiated' or 'Processing' but can not detect status of PID
    Updating process instance's status to Error.
         Process Name: PTPDBTST
         Process Type: COBOL SQL
         Session Id:   2656
 =====================================================================
   Number of requests removed from Task Active List:  1
    Server: PSNT checking status...
</pre>
<p>So, I took the command line from the file, and I tried to run it in a command window. Here&#8217;s what happened:</p>
<pre class="brush: plain; title: ; notranslate">

E:\&gt;cd \oracle\11.1.0\client

E:\oracle\11.1.0\client&gt;
E:\oracle\11.1.0\client&gt;C:\pshome\hcm89\CBLBINA\PTPDBTST.EXE ORACLE/HCM89/PS/PS/
SCR/1236//0

Application Program Failed
 Action Type     : SQL CONNEC
 In Pgm Section  : SQLRT:GG100 SQL-CONNECT
 With Return Code: 09989
 Error Message   : SQLRT: Operator ID not allowed to submit COBOL from client

FAIL TO CONNECT
PTPDBTST:
Application Program Failed
 In Pgm Section  : CONNECT FAILED
 With Return Code: 09989
 Error Message   : SQLRT: Operator ID not allowed to submit COBOL from client
</pre>
<p>On the <a href="http://peoplesoft.wikidot.com/compiling-cobol-locally" target="_blank">PeopleSoft Wiki</a>, I found that you are not supposed to have the bin directory from your PeopleSoft home on your path. Just to test, I adjusted the path for just the one command window, and tried it:</p>
<pre class="brush: plain; title: ; notranslate">

E:\oracle\11.1.0\client&gt;echo %path%
E:\oracle\11.1.0\client;E:\Java\jrockit-jdk1.6.0_24-R28.1.3-4.0.1\bin;C:\pshome\
hcm89\bin\client\winx86;E:\oracle\11.2.0\dbhome_1\BIN;C:\WINDOWS\system32;C:\WIN
DOWS;C:\WINDOWS\System32\Wbem;c:\pshome\bea\tuxedo11gR1\bin;c:\pshome\bea\tuxedo
11gR1\jre\bin\server;c:\pshome\bea\tuxedo11gR1\jre\bin

E:\oracle\11.1.0\client&gt;set path=E:\oracle\11.1.0\client;E:\Java\jrockit-jdk1.6.
0_24-R28.1.3-4.0.1\bin;E:\oracle\11.2.0\dbhome_1\BIN;C:\WINDOWS\system32;C:\WIND
OWS;C:\WINDOWS\System32\Wbem;c:\pshome\bea\tuxedo11gR1\bin;c:\pshome\bea\tuxedo1
1gR1\jre\bin\server;c:\pshome\bea\tuxedo11gR1\jre\bin

E:\oracle\11.1.0\client&gt;C:\pshome\hcm89\CBLBINA\PTPDBTST.EXE ORACLE/HCM89/PS/PS/
SCR/1236//0
Unable to load program: PSSQLORA_ANSI.DLL    Application terminated.
</pre>
<p>So, I did a search for PSSQLORA_ANSI.DLL, and I found it in the server bin directory. When I put that on the path, I got a little further:</p>
<pre class="brush: plain; title: ; notranslate">

E:\oracle\11.1.0\client&gt;set path=c:\pshome\hcm89\bin\server\winx86;%path%

E:\oracle\11.1.0\client&gt;C:\pshome\hcm89\CBLBINA\PTPDBTST.EXE ORACLE/HCM89/PS/PS
psoracle/1237//0
SUCCESSFUL DATABASE CONNECTION
PTPSQLRT - ERROR IN BIND SETUP/DATA
STATEMENT=PTPUSTAT_U_PRCRQSE
VARIABLE#=001
DATA TYPE=001
DATA LEN =0001
SCALE    =000

Application Program Failed
 Action Type     : SQL UPDATE
 In Pgm Section  : SQLRT: PROCESS-SETUP(BIND)
 With Return Code: 08001
 Error Message   : Invalid bind variable number
 Stored Stmt     : PTPUSTAT_U_PRCRQSE
 SQL Statement   : UPDATE PSPRCSRQST SET RUNSTATUS = :1 ,PRCSRTNCD = :2 ,ENDDTT
                   M = SYSDATE ,LASTUPDDTTM = SYSDATE ,CONTINUEJOB = :3 WHERE P
                   RCSINSTANCE = :4

                                       at pos 00028

PTPSQLRT - Error Encountered
No longer have connection to DB due to an error from previous
action: SQL UPDATE. Bypassing current action: SQL SELECT.
Terminating Program.
</pre>
<p>Then, I found why I was getting the SQL error. My compile process was not completing properly:</p>
<pre class="brush: plain; title: ; notranslate">
Compile error for SRPCTEXT.obj
Compile error for SRPCWD.obj
The error list is in c:\temp\compile\ERROR.LIS
.
Aborting this process !!! EXEs/GNTs/INTs are not going to be copied/replaced...
.
Please fix the errors and rerun this batch file !!!!!!!
</pre>
<p>So, I looked in the c:\temp\compile\CBLBLD.log and I found a reference to the LIS files that contained the error messages:</p>
<pre class="brush: plain; title: ; notranslate">

********** COMPILE PTPWLGEN.GNT **********

********** COMPILE SFP1098P.GNT **********

Creating error listing (SFP1098P.LIS)
                                  --------------------

********** COMPILE SFPAPLPY.GNT **********

Creating error listing (SFPAPLPY.LIS)
                                  --------------------

********** COMPILE SFPBCALC.GNT **********

Creating error listing (SFPBCALC.LIS)
                                  --------------------
</pre>
<p>Then, in the SFP1098P.LIS, I found a specific error message. The end of the file said that the last message was on page 153. There, I found this:</p>
<pre class="brush: plain; title: ; notranslate">

  7223     END-IF
  7224
  7225     SET MSG-NBR-TOT-REC-INS       OF LOGMS TO TRUE
*  12-S******************************************                      (  68)**
**    Operand MSG-NBR-TOT-REC-INS is not declared
  7226     MOVE 4     TO PARM-COUNT      OF LOGMS
  7227     SET SEVERITY-INFO             OF LOGMS TO TRUE
</pre>
<p>That didn&#8217;t help me too much, so I opened it up in GVim. Then, I could do a regex search to find the lines that start with two asterisks (**) &#8212; &#8220;/^\*\*&#8221;.</p>
<p>That turned up the answer. I was missing a copy file:</p>
<pre class="brush: plain; title: ; notranslate">
   626******************************************************************
   627
*  628                                 COPY SFC1098P.
*   8-S**********************************************                  (   0)**
**    Unknown COPY file SFC1098P specified
</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpsst0101.digitaleagle.net%2F2012%2F03%2F22%2Ftroubleshooting-cobol-problem%2F&amp;title=Troubleshooting%20COBOL%20Problem" id="wpa2a_10"><img src="http://psst0101.digitaleagle.net/wp-content/plugins/add-to-any/share_save_171_16.png?9d7bd4" width="171" height="16" alt="Share"/></a></p><script type="text/javascript"><!--
google_ad_client = "ca-pub-0150736232923269";
/* PSST0101 Bottom Ads */
google_ad_slot = "3671384318";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>]]></content:encoded>
			<wfw:commentRss>http://psst0101.digitaleagle.net/2012/03/22/troubleshooting-cobol-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle: semget failed!</title>
		<link>http://psst0101.digitaleagle.net/2012/03/21/oracle-semget-failed/</link>
		<comments>http://psst0101.digitaleagle.net/2012/03/21/oracle-semget-failed/#comments</comments>
		<pubDate>Thu, 22 Mar 2012 02:08:52 +0000</pubDate>
		<dc:creator>digitaleagle</dc:creator>
				<category><![CDATA[Oracle DBA]]></category>

		<guid isPermaLink="false">http://psst0101.digitaleagle.net/?p=1691</guid>
		<description><![CDATA[I had an issue with starting a database a while back.  Basically, I ran out of resources on the server, and I had to adjust the kernel parameters.  Here are the details&#8230; Error message: According to Sam&#8217;s Oracle Blog, check the SHMMNS kernel parameter.  According to IBM, you can use the &#8220;ipcs -l&#8221; command and [...]<hr /><script type="text/javascript"><!--\ngoogle_ad_client = "ca-pub-0150736232923269";\n/* PSST0101 Bottom Ads */\ngoogle_ad_slot = "3671384318";\ngoogle_ad_width = 468;\ngoogle_ad_height = 60;\n//-->\n</script>\n<script type="text/javascript"\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\n</script><hr />]]></description>
			<content:encoded><![CDATA[<p>I had an issue with starting a database a while back.  Basically, I ran out of resources on the server, and I had to adjust the kernel parameters.  Here are the details&#8230;</p>
<p>Error message:</p>
<pre class="brush: plain; title: ; notranslate">
ORA-27154: post/wait create failed
ORA-27300: OS system dependent operation:semget failed with status: 28
ORA-27301: OS failure message: No space left on device
ORA-27302: failure occurred at: sskgpcreates
</pre>
<p><span id="more-1691"></span></p>
<p>According to <a href="http://sams-oracle-blog.blogspot.com/2008/08/ora-27300-os-system-dependent.html" target="_blank">Sam&#8217;s Oracle Blog</a>, check the SHMMNS kernel parameter.  According to <a href="http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=%2Fcom.ibm.db2.udb.uprun.doc%2Fdoc%2Ft0008238.htm" target="_blank">IBM</a>, you can use the &#8220;ipcs -l&#8221; command and look on the line that says &#8220;max semaphores system wide&#8221;.  So, try this:</p>
<pre class="brush: plain; title: ; notranslate">

$ipcs -l | grep &quot;max semaphores system wide&quot;
max semaphores system wide = 32000
</pre>
<p>To change the setting, edit the &#8220;/etc/sysctl.conf&#8221; file:</p>
<pre class="brush: plain; title: ; notranslate">
vi /etc/sysctl.conf
</pre>
<p>Change this line:</p>
<pre class="brush: plain; title: ; notranslate">
kernel.sem = 250 32000 100 128
</pre>
<p>I doubled it:</p>
<pre class="brush: plain; title: ; notranslate">
kernel.sem = 250 64000 100 128
</pre>
<p>To, make the changes take affect, run:</p>
<pre class="brush: plain; title: ; notranslate">
sudo sysctl -p
</pre>
<p>Now, you should have the correct number:</p>
<pre class="brush: plain; title: ; notranslate">

$ipcs -l | grep &quot;max semaphores system wide&quot;
max semaphores system wide = 64000
</pre>
<p>It still didn&#8217;t work.  <a href="http://blog.ronnyegner-consulting.de/2011/04/11/ora-27154-postwait-create-failed-ora-27301-os-failure-message-no-space-left-on-device-when-starting-asm-or-database-instance/" target="_blank">Ronny Egner&#8217;s blog</a> suggested changing to this:</p>
<pre class="brush: plain; title: ; notranslate">
kernel.sem = 250 64000 100 256
</pre>
<p>After the &#8220;sysctl -p&#8221; command, that fixed the problem.</p>
<p>Resources:</p>
<ul>
<li><a href="http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=%2Fcom.ibm.db2.udb.uprun.doc%2Fdoc%2Ft0008238.htm" target="_blank">IBM: Modifying Kernel Parameters</a></li>
<li><a href="http://sams-oracle-blog.blogspot.com/2008/08/ora-27300-os-system-dependent.html" target="_blank">Sam&#8217;s Oracle Blog: ORA-27300: OS system dependent operation:semget failed with status: 28</a></li>
<li><a href="http://www.ora600.be/news/ora-27154-postwait-create-failed-ora-27300-os-system-dependent-operationsemget-failed-status-28" target="_blank">ORA-27154: post/wait create failed ORA-27300: OS system dependent operation:semget failed with status: 28</a></li>
<li><a href="https://forums.oracle.com/forums/thread.jspa?threadID=540004" target="_blank">Oracle Forums: Thread: ORA-00020: maximum number of processes (%s) exceeded</a></li>
<li><a href="http://blog.ronnyegner-consulting.de/2011/04/11/ora-27154-postwait-create-failed-ora-27301-os-failure-message-no-space-left-on-device-when-starting-asm-or-database-instance/" target="_blank">Ronny Egner&#8217;s blog: ORA-27154: post/wait create failed / ORA-27301: OS failure message: No space left on device when starting ASM or database instance</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpsst0101.digitaleagle.net%2F2012%2F03%2F21%2Foracle-semget-failed%2F&amp;title=Oracle%3A%20semget%20failed%21" id="wpa2a_12"><img src="http://psst0101.digitaleagle.net/wp-content/plugins/add-to-any/share_save_171_16.png?9d7bd4" width="171" height="16" alt="Share"/></a></p><script type="text/javascript"><!--
google_ad_client = "ca-pub-0150736232923269";
/* PSST0101 Bottom Ads */
google_ad_slot = "3671384318";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>]]></content:encoded>
			<wfw:commentRss>http://psst0101.digitaleagle.net/2012/03/21/oracle-semget-failed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script: Check Flash Recovery Usage</title>
		<link>http://psst0101.digitaleagle.net/2012/03/01/script-check-flash-recovery-usage/</link>
		<comments>http://psst0101.digitaleagle.net/2012/03/01/script-check-flash-recovery-usage/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 03:21:32 +0000</pubDate>
		<dc:creator>digitaleagle</dc:creator>
				<category><![CDATA[Oracle DBA]]></category>

		<guid isPermaLink="false">http://psst0101.digitaleagle.net/?p=1714</guid>
		<description><![CDATA[I&#8217;ve been trying to monitor the archive log usage for our databases, and I came up with this little script.  I thought I would share in case it would help anyone, but also, please correct me if there is a better way or you see anything wrong. Here&#8217;s the basic version.  You can change the [...]<hr /><script type="text/javascript"><!--\ngoogle_ad_client = "ca-pub-0150736232923269";\n/* PSST0101 Bottom Ads */\ngoogle_ad_slot = "3671384318";\ngoogle_ad_width = 468;\ngoogle_ad_height = 60;\n//-->\n</script>\n<script type="text/javascript"\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\n</script><hr />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been trying to monitor the archive log usage for our databases, and I came up with this little script.  I thought I would share in case it would help anyone, but also, please correct me if there is a better way or you see anything wrong.</p>
<p>Here&#8217;s the basic version.  You can change the database names in the for loop.</p>
<pre class="brush: bash; title: ; notranslate">

tmpfile=/tmp/$(whoami)sql.txt
echo &quot;DB_NAME FILE_TYPE PERCENT_SPACE_USED NUMBER_OF_FILES&quot; &gt; $tmpfile
echo &quot;------- -------------------- ------------------ ---------------&quot; &gt;&gt; $tmpfile
for e in FN91DMO FN91CFG FN91DEV FN91TST
do
 export ORACLE_SID=$e
 sqlplus -s / as sysdba &gt;&gt; $tmpfile &lt;&lt;!
 set head off
 set feedback off
 select '$e' DB_NAME, FILE_TYPE, PERCENT_SPACE_USED, NUMBER_OF_FILES
 from v\$flash_recovery_area_usage
 where PERCENT_SPACE_USED &gt; 0;
 exit;
!
done
sed '/^$/d' $tmpfile
rm $tmpfile
</pre>
<p>This next version calls a script to get the database names.  For example, I have the databases stored in an XML file, and I built a perl script that would read the XML file and print the database names.</p>
<pre class="brush: bash; title: ; notranslate">

tmpfile=/tmp/$(whoami)sql.txt
echo &quot;DB_NAME FILE_TYPE PERCENT_SPACE_USED NUMBER_OF_FILES&quot; &gt; $tmpfile
echo &quot;------- -------------------- ------------------ ---------------&quot; &gt;&gt; $tmpfile
for e in $(buildDBList)
do
 export ORACLE_SID=$e
 sqlplus -s / as sysdba &gt;&gt; $tmpfile &lt;&lt;!
 set head off
 set feedback off
 select '$e' DB_NAME, FILE_TYPE, PERCENT_SPACE_USED, NUMBER_OF_FILES
 from v\$flash_recovery_area_usage
 where PERCENT_SPACE_USED &gt; 0;
 exit;
!
done
sed '/^$/d' $tmpfile
rm $tmpfile
</pre>
<p>Finally, this version calls a script to check the status of the database.  If the database is down or temporarily off, it skips that database.</p>
<pre class="brush: bash; title: ; notranslate">

tmpfile=/tmp/$(whoami)sql.txt
echo &quot;DB_NAME FILE_TYPE PERCENT_SPACE_USED NUMBER_OF_FILES&quot; &gt; $tmpfile
echo &quot;------- -------------------- ------------------ ---------------&quot; &gt;&gt; $tmpfile
for e in $(buildDBList)
do
 export ORACLE_SID=$e
 checkDBStatus $e 2&gt;&amp;1 &gt; /dev/null
 if [ $? -eq 0 ]; then
   sqlplus -s / as sysdba &gt;&gt; $tmpfile &lt;&lt;!
   set head off
   set feedback off
   select '$e' DB_NAME, FILE_TYPE, PERCENT_SPACE_USED, NUMBER_OF_FILES
   from v\$flash_recovery_area_usage
   where PERCENT_SPACE_USED &gt; 0;
   exit;
!
 fi
done
sed '/^$/d' $tmpfile
rm $tmpfile
</pre>
<h3>Resources</h3>
<ul>
<li><a href="http://docs.oracle.com/cd/B19306_01/server.102/b14237/dynviews_1110.htm" target="_blank">Oracle Database Reference: V$FLASH_RECOVERY_AREA_USAGE</a></li>
<li><a href="http://docs.oracle.com/cd/B19306_01/backup.102/b14192/setup005.htm" target="_blank">Oracle Database Backup and Recovery Basics: 3.5 Setting Up a Flash Recovery Area for RMAN</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpsst0101.digitaleagle.net%2F2012%2F03%2F01%2Fscript-check-flash-recovery-usage%2F&amp;title=Script%3A%20Check%20Flash%20Recovery%20Usage" id="wpa2a_14"><img src="http://psst0101.digitaleagle.net/wp-content/plugins/add-to-any/share_save_171_16.png?9d7bd4" width="171" height="16" alt="Share"/></a></p><script type="text/javascript"><!--
google_ad_client = "ca-pub-0150736232923269";
/* PSST0101 Bottom Ads */
google_ad_slot = "3671384318";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>]]></content:encoded>
			<wfw:commentRss>http://psst0101.digitaleagle.net/2012/03/01/script-check-flash-recovery-usage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a Readonly Database User</title>
		<link>http://psst0101.digitaleagle.net/2012/02/16/creating-a-readonly-database-user/</link>
		<comments>http://psst0101.digitaleagle.net/2012/02/16/creating-a-readonly-database-user/#comments</comments>
		<pubDate>Fri, 17 Feb 2012 03:58:16 +0000</pubDate>
		<dc:creator>digitaleagle</dc:creator>
				<category><![CDATA[Oracle DBA]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://psst0101.digitaleagle.net/?p=1704</guid>
		<description><![CDATA[Here&#8217;s a common task: You need to create a database user with read only access.  You have some power users who know how to use SQL, and they are allowed to see all of the data in the system.  You can use these commands to create such a user (in Oracle): Note: You can probably [...]<hr /><script type="text/javascript"><!--\ngoogle_ad_client = "ca-pub-0150736232923269";\n/* PSST0101 Bottom Ads */\ngoogle_ad_slot = "3671384318";\ngoogle_ad_width = 468;\ngoogle_ad_height = 60;\n//-->\n</script>\n<script type="text/javascript"\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\n</script><hr />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a common task: You need to create a database user with read only access.  You have some power users who know how to use SQL, and they are allowed to see all of the data in the system.  You can use these commands to create such a user (in Oracle):</p>
<pre class="brush: sql; title: ; notranslate">
create user PSRO identified by PSRO;
grant create session, select any table, select any dictionary to PSRO;
</pre>
<p><strong>Note</strong>: You can probably find this all over the web, but I wanted to capture it on my blog so that I could find the syntax easier.</p>
<h3>Resources</h3>
<ul>
<li><a href="https://forums.oracle.com/forums/thread.jspa?threadID=1091477" target="_blank">OTN Discussions: How to create a read only user in Oracle 11g? </a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpsst0101.digitaleagle.net%2F2012%2F02%2F16%2Fcreating-a-readonly-database-user%2F&amp;title=Creating%20a%20Readonly%20Database%20User" id="wpa2a_16"><img src="http://psst0101.digitaleagle.net/wp-content/plugins/add-to-any/share_save_171_16.png?9d7bd4" width="171" height="16" alt="Share"/></a></p><script type="text/javascript"><!--
google_ad_client = "ca-pub-0150736232923269";
/* PSST0101 Bottom Ads */
google_ad_slot = "3671384318";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>]]></content:encoded>
			<wfw:commentRss>http://psst0101.digitaleagle.net/2012/02/16/creating-a-readonly-database-user/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Finding Data in Temp Tables</title>
		<link>http://psst0101.digitaleagle.net/2012/02/15/finding-data-in-temp-tables/</link>
		<comments>http://psst0101.digitaleagle.net/2012/02/15/finding-data-in-temp-tables/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 03:56:40 +0000</pubDate>
		<dc:creator>digitaleagle</dc:creator>
				<category><![CDATA[%Table]]></category>
		<category><![CDATA[App Engine]]></category>

		<guid isPermaLink="false">http://psst0101.digitaleagle.net/?p=1697</guid>
		<description><![CDATA[Here&#8217;s a simple little trick for Application Engines that have Temporary Tables assigned. When you have temporary tables, you don&#8217;t know for sure which Temporary Table it is using.  You could write a quick select and change the number on the end until you find the one you are looking for, but here is a [...]<hr /><script type="text/javascript"><!--\ngoogle_ad_client = "ca-pub-0150736232923269";\n/* PSST0101 Bottom Ads */\ngoogle_ad_slot = "3671384318";\ngoogle_ad_width = 468;\ngoogle_ad_height = 60;\n//-->\n</script>\n<script type="text/javascript"\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\n</script><hr />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a simple little trick for Application Engines that have Temporary Tables assigned.</p>
<p>When you have temporary tables, you don&#8217;t know for sure which Temporary Table it is using.  You could write a quick select and change the number on the end until you find the one you are looking for, but here is a slightly quicker method.</p>
<p>Note: This is designed for Oracle, but you could easily change it up to work with SQL Server.</p>
<p>First, build a select statement that will list all of the tables.  We&#8217;ll assume our Temporary Table Record is MY_TEMP_TAO.  You can substitute with your specific record.</p>
<pre class="brush: sql; title: ; notranslate">
SELECT 'UNION SELECT ''' || TABLE_NAME || ''' TBL, A.* FROM SYSADM.' || TABLE_NAME || ' A'
FROM DBA_TABLES
WHERE table_name LIKE 'PS_MY_TEMP_TAO%';
</pre>
<p><strong>Update</strong> (thanks to Nicolas): You can avoid having to remove the first UNION if you use something more like this:</p>
<pre class="brush: sql; title: ; notranslate">
SELECT 'SELECT ”' || TABLE_NAME || ”' TBL, A.* ' ||
       'FROM SYSADM.’ || TABLE_NAME || ' A' ||
       case when count(*)over()=rownum
            then ';' else ' UNION ' end
FROM DBA_TABLES
WHERE LIKE 'PS_MY_TEMP_TAO%';
</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The output should look something like this:</p>
<pre class="brush: sql; title: ; notranslate">
UNION SELECT 'PS_MY_TEMP_TAO' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO A
UNION SELECT 'PS_MY_TEMP_TAO1' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO1 A
UNION SELECT 'PS_MY_TEMP_TAO2' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO2 A
UNION SELECT 'PS_MY_TEMP_TAO3' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO3 A
UNION SELECT 'PS_MY_TEMP_TAO4' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO4 A
UNION SELECT 'PS_MY_TEMP_TAO5' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO5 A
UNION SELECT 'PS_MY_TEMP_TAO6' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO6 A;
</pre>
<p>You just simply need to delete the first Union to make something like this:</p>
<pre class="brush: sql; title: ; notranslate">
SELECT 'PS_MY_TEMP_TAO' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO A
UNION SELECT 'PS_MY_TEMP_TAO1' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO1 A
UNION SELECT 'PS_MY_TEMP_TAO2' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO2 A
UNION SELECT 'PS_MY_TEMP_TAO3' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO3 A
UNION SELECT 'PS_MY_TEMP_TAO4' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO4 A
UNION SELECT 'PS_MY_TEMP_TAO5' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO5 A
UNION SELECT 'PS_MY_TEMP_TAO6' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO6 A;
</pre>
<p>If you know your temp table has the process instance as the key and you know the one you are looking for, you could do something like this:</p>
<pre class="brush: sql; title: ; notranslate">
SELECT * FROM (
     SELECT 'PS_MY_TEMP_TAO' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO A
     UNION SELECT 'PS_MY_TEMP_TAO1' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO1 A
     UNION SELECT 'PS_MY_TEMP_TAO2' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO2 A
     UNION SELECT 'PS_MY_TEMP_TAO3' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO3 A
     UNION SELECT 'PS_MY_TEMP_TAO4' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO4 A
     UNION SELECT 'PS_MY_TEMP_TAO5' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO5 A
     UNION SELECT 'PS_MY_TEMP_TAO6' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO6 A;
) Z WHERE PROCESS_INSTANCE = 12345
</pre>
<div></div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpsst0101.digitaleagle.net%2F2012%2F02%2F15%2Ffinding-data-in-temp-tables%2F&amp;title=Finding%20Data%20in%20Temp%20Tables" id="wpa2a_18"><img src="http://psst0101.digitaleagle.net/wp-content/plugins/add-to-any/share_save_171_16.png?9d7bd4" width="171" height="16" alt="Share"/></a></p><script type="text/javascript"><!--
google_ad_client = "ca-pub-0150736232923269";
/* PSST0101 Bottom Ads */
google_ad_slot = "3671384318";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>]]></content:encoded>
			<wfw:commentRss>http://psst0101.digitaleagle.net/2012/02/15/finding-data-in-temp-tables/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Website Move Complete</title>
		<link>http://psst0101.digitaleagle.net/2012/01/27/website-move-complete/</link>
		<comments>http://psst0101.digitaleagle.net/2012/01/27/website-move-complete/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 21:23:09 +0000</pubDate>
		<dc:creator>digitaleagle</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://psst0101.digitaleagle.net/?p=1689</guid>
		<description><![CDATA[Just a quick post to let you know the website move is complete.  I&#8217;m sorry about any down time you may have experienced.  Hopefully, I can get active again and start blogging again. If you are interested in the details check out: My lessons learned Website speeds<hr /><script type="text/javascript"><!--\ngoogle_ad_client = "ca-pub-0150736232923269";\n/* PSST0101 Bottom Ads */\ngoogle_ad_slot = "3671384318";\ngoogle_ad_width = 468;\ngoogle_ad_height = 60;\n//-->\n</script>\n<script type="text/javascript"\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\n</script><hr />]]></description>
			<content:encoded><![CDATA[<p>Just a quick post to let you know the website move is complete.  I&#8217;m sorry about any down time you may have experienced.  Hopefully, I can get active again and start blogging again.</p>
<p>If you are interested in the details check out:</p>
<ul>
<li><a href="http://stephen.digitaleagle.net/2012/01/27/website-move-complete/">My lessons learned</a></li>
<li><a href="http://stephen.digitaleagle.net/2012/01/27/speed-test-results/">Website speeds</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpsst0101.digitaleagle.net%2F2012%2F01%2F27%2Fwebsite-move-complete%2F&amp;title=Website%20Move%20Complete" id="wpa2a_20"><img src="http://psst0101.digitaleagle.net/wp-content/plugins/add-to-any/share_save_171_16.png?9d7bd4" width="171" height="16" alt="Share"/></a></p><script type="text/javascript"><!--
google_ad_client = "ca-pub-0150736232923269";
/* PSST0101 Bottom Ads */
google_ad_slot = "3671384318";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>]]></content:encoded>
			<wfw:commentRss>http://psst0101.digitaleagle.net/2012/01/27/website-move-complete/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (Feed is rejected)
Page Caching using disk: basic
Database Caching 18/45 queries in 0.031 seconds using disk: basic

Served from: psst0101.digitaleagle.net @ 2012-05-20 06:15:07 -->
