<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Performance improvement &#8211; RPGLE</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/</link>
	<description></description>
	<lastBuildDate>Thu, 20 Jun 2013 07:50:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: TomLiotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/#comment-114121</link>
		<dc:creator>TomLiotta</dc:creator>
		<pubDate>Sat, 08 Dec 2012 01:29:21 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/#comment-114121</guid>
		<description><![CDATA[Previously I was only suggesting some actual benchmarks comparing CHAIN with array lookups. I&#039;m almost interested enough to do them myself, but I&#039;m not sure how many variables there are for such test cases. I&#039;d like to believe that an integrated DB2 would be relatively efficient, but...? What OS version is running?
&#160;
Anyway, I also like the general code structure that is &lt;EM&gt;suggested&lt;/EM&gt; by the snippets we can see, though it&#039;s far from certain. We simply don&#039;t see enough.
&#160;
For example, get_name, get_ID and get_code are all separate procs. But do they all access separate files? (Are the files global?)&#160;Do the secondary files all have the same keys? If any of the files are the same, does each proc still do&#160;its own&#160;CHAIN? The CHAINs themselves might not be much of a drag if there&#039;s no positioning, but the data movement might be excessive.
&#160;
It&#039;s understandable to have procs to get values. It&#039;s not so certain that they&#039;re appropriate for this program. If keys match, perhaps a join VIEW or LF might retrieve many values at once into an externally-described DS. That could put code out of the program down into a lower, more efficient level.
&#160;
Also, are file accesses retrieving entire record formats for PFs with many fields? Or&#160;are they LF&#160;formats only move the individual fields that are returned by the procs?
&#160;
How many physical files are accessed? How are they related? How are they indexed? How are VIEWs/LFs defined over them? How many processes are competing for the same resources (files, memory pools, activity levels, whatever)?
&#160;
In fact, what exactly is the whole point of this program? Reading through 4M records sequentially to update all/many/some/a few seems odd enough. What is &lt;EM&gt;business objective&lt;/EM&gt; for this process?
&#160;
We don&#039;t know near enough yet. From what I see, a few SQL statements might replace it all, e.g., one UPDATE for case &#039;ST&#039;, a second for &#039;UR&#039; and possibly a third for &quot;other&quot;, assuming that VIEWs/INDEXs exist. ut that&#039;s only from &quot;what I see&quot;. &#160;There isn&#039;t any visible program logic in what&#039;s been shown to indicate that procedural programming is needed. But we simply don&#039;t see nearly enough. We can&#039;t tell where any bottlenecks might be other than handling too many records, maybe.
&#160;
Tom]]></description>
		<content:encoded><![CDATA[<p>Previously I was only suggesting some actual benchmarks comparing CHAIN with array lookups. I&#8217;m almost interested enough to do them myself, but I&#8217;m not sure how many variables there are for such test cases. I&#8217;d like to believe that an integrated DB2 would be relatively efficient, but&#8230;? What OS version is running?<br />
&nbsp;<br />
Anyway, I also like the general code structure that is <em>suggested</em> by the snippets we can see, though it&#8217;s far from certain. We simply don&#8217;t see enough.<br />
&nbsp;<br />
For example, get_name, get_ID and get_code are all separate procs. But do they all access separate files? (Are the files global?)&nbsp;Do the secondary files all have the same keys? If any of the files are the same, does each proc still do&nbsp;its own&nbsp;CHAIN? The CHAINs themselves might not be much of a drag if there&#8217;s no positioning, but the data movement might be excessive.<br />
&nbsp;<br />
It&#8217;s understandable to have procs to get values. It&#8217;s not so certain that they&#8217;re appropriate for this program. If keys match, perhaps a join VIEW or LF might retrieve many values at once into an externally-described DS. That could put code out of the program down into a lower, more efficient level.<br />
&nbsp;<br />
Also, are file accesses retrieving entire record formats for PFs with many fields? Or&nbsp;are they LF&nbsp;formats only move the individual fields that are returned by the procs?<br />
&nbsp;<br />
How many physical files are accessed? How are they related? How are they indexed? How are VIEWs/LFs defined over them? How many processes are competing for the same resources (files, memory pools, activity levels, whatever)?<br />
&nbsp;<br />
In fact, what exactly is the whole point of this program? Reading through 4M records sequentially to update all/many/some/a few seems odd enough. What is <em>business objective</em> for this process?<br />
&nbsp;<br />
We don&#8217;t know near enough yet. From what I see, a few SQL statements might replace it all, e.g., one UPDATE for case &#8216;ST&#8217;, a second for &#8216;UR&#8217; and possibly a third for &#8220;other&#8221;, assuming that VIEWs/INDEXs exist. ut that&#8217;s only from &#8220;what I see&#8221;. &nbsp;There isn&#8217;t any visible program logic in what&#8217;s been shown to indicate that procedural programming is needed. But we simply don&#8217;t see nearly enough. We can&#8217;t tell where any bottlenecks might be other than handling too many records, maybe.<br />
&nbsp;<br />
Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: philpl1jb</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/#comment-114097</link>
		<dc:creator>philpl1jb</dc:creator>
		<pubDate>Fri, 07 Dec 2012 13:50:33 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/#comment-114097</guid>
		<description><![CDATA[I love your code...but it&#039;s my understanding that each procedure call takes some extra cycles over subroutines or in-line code...
I&#039;m confident that Tom will straighten me out on that issue.]]></description>
		<content:encoded><![CDATA[<p>I love your code&#8230;but it&#8217;s my understanding that each procedure call takes some extra cycles over subroutines or in-line code&#8230;<br />
I&#8217;m confident that Tom will straighten me out on that issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: harith</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/#comment-114095</link>
		<dc:creator>harith</dc:creator>
		<pubDate>Fri, 07 Dec 2012 13:37:02 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/#comment-114095</guid>
		<description><![CDATA[use the CASE stament in Embedded SQL that will update the records at one shot]]></description>
		<content:encoded><![CDATA[<p>use the CASE stament in Embedded SQL that will update the records at one shot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ZWANZIG</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/#comment-114079</link>
		<dc:creator>ZWANZIG</dc:creator>
		<pubDate>Fri, 07 Dec 2012 04:54:48 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/#comment-114079</guid>
		<description><![CDATA[Hi Philip,
get_name,get_code,get_id&#160;all are procedures.&#160;each of these procedures&#160;use CHAIN operation to retrieve the coresponding value from different files.
&#160;Thanks
CV]]></description>
		<content:encoded><![CDATA[<p>Hi Philip,<br />
get_name,get_code,get_id&nbsp;all are procedures.&nbsp;each of these procedures&nbsp;use CHAIN operation to retrieve the coresponding value from different files.<br />
&nbsp;Thanks<br />
CV</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: philpl1jb</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/#comment-114065</link>
		<dc:creator>philpl1jb</dc:creator>
		<pubDate>Thu, 06 Dec 2012 19:25:12 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/#comment-114065</guid>
		<description><![CDATA[What is get_name a field or a function?]]></description>
		<content:encoded><![CDATA[<p>What is get_name a field or a function?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TomLiotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/#comment-114049</link>
		<dc:creator>TomLiotta</dc:creator>
		<pubDate>Thu, 06 Dec 2012 10:24:21 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/#comment-114049</guid>
		<description><![CDATA[&lt;EM&gt;Please find the below&#160;code sample.&lt;/EM&gt;
&#160;
Good start. All we need now are database definitions, system/environment specs and the rest of the program, and then we&#160;can make progress.
&#160;
Tom]]></description>
		<content:encoded><![CDATA[<p><em>Please find the below&nbsp;code sample.</em><br />
&nbsp;<br />
Good start. All we need now are database definitions, system/environment specs and the rest of the program, and then we&nbsp;can make progress.<br />
&nbsp;<br />
Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ZWANZIG</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/#comment-114048</link>
		<dc:creator>ZWANZIG</dc:creator>
		<pubDate>Thu, 06 Dec 2012 08:51:44 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/#comment-114048</guid>
		<description><![CDATA[Thanks everyone for your time.
Please find the below&#160;code sample. They are reading each and every record and getting the field values through various procedures.
Read Masterfile
Dow Not%EOF
select 
when dtatyp = &#039;ST&#039;
callp updtefld_ST
when dtatyp = &#039;UR&#039;
callp updtefld_UR
other 
callp updtefld_other
endsl
Read masterfile
EndDo
&lt;STRONG&gt;updtefld_st - procedure&lt;/STRONG&gt;
Eval&#160;name = get_name
Eval&#160;Id = get_ID
Eval&#160;code = get_code-----
-----
----&#160; etc
&#160;
&#160;
&#160;]]></description>
		<content:encoded><![CDATA[<p>Thanks everyone for your time.<br />
Please find the below&nbsp;code sample. They are reading each and every record and getting the field values through various procedures.<br />
Read Masterfile<br />
Dow Not%EOF<br />
select<br />
when dtatyp = &#8216;ST&#8217;<br />
callp updtefld_ST<br />
when dtatyp = &#8216;UR&#8217;<br />
callp updtefld_UR<br />
other<br />
callp updtefld_other<br />
endsl<br />
Read masterfile<br />
EndDo<br />
<strong>updtefld_st &#8211; procedure</strong><br />
Eval&nbsp;name = get_name<br />
Eval&nbsp;Id = get_ID<br />
Eval&nbsp;code = get_code&#8212;&#8211;<br />
&#8212;&#8211;<br />
&#8212;-&nbsp; etc<br />
&nbsp;<br />
&nbsp;<br />
&nbsp;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: philpl1jb</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/#comment-114022</link>
		<dc:creator>philpl1jb</dc:creator>
		<pubDate>Wed, 05 Dec 2012 17:02:01 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/#comment-114022</guid>
		<description><![CDATA[Tom
You&#039;re always right, but let me say that I am emotionally incredulous.
and





Incredulity robs us of many pleasures, and gives us nothing in return.&#160; 

&#160;James Russell Lowell
&#160;]]></description>
		<content:encoded><![CDATA[<p>Tom<br />
You&#8217;re always right, but let me say that I am emotionally incredulous.<br />
and</p>
<p>Incredulity robs us of many pleasures, and gives us nothing in return.&nbsp; </p>
<p>&nbsp;James Russell Lowell<br />
&nbsp;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TomLiotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/#comment-113980</link>
		<dc:creator>TomLiotta</dc:creator>
		<pubDate>Tue, 04 Dec 2012 21:00:56 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/#comment-113980</guid>
		<description><![CDATA[&lt;EM&gt;...moving these into arrays and using lookups instead of chains can improve performatnce...&lt;/EM&gt;
&#160;
Does it? I&#039;ve never actually tested. If the files are indeed small, it&#039;s not clear why it would be any faster. An array lookup is essentially the same as an index search. And if the files are small and accessed regularly during the job, they may be brought into the memory pool anyway. (If not, then SETOBJACC can force them to be memory resident without changing the program logic.)
&#160;
DB2 system-level code is reasonably efficient. It might be more efficient than coded program logic... if the database is appropriately designed. The design might be the biggest issue. Could be an interesting test.
&#160;
Tom]]></description>
		<content:encoded><![CDATA[<p><em>&#8230;moving these into arrays and using lookups instead of chains can improve performatnce&#8230;</em><br />
&nbsp;<br />
Does it? I&#8217;ve never actually tested. If the files are indeed small, it&#8217;s not clear why it would be any faster. An array lookup is essentially the same as an index search. And if the files are small and accessed regularly during the job, they may be brought into the memory pool anyway. (If not, then SETOBJACC can force them to be memory resident without changing the program logic.)<br />
&nbsp;<br />
DB2 system-level code is reasonably efficient. It might be more efficient than coded program logic&#8230; if the database is appropriately designed. The design might be the biggest issue. Could be an interesting test.<br />
&nbsp;<br />
Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ToddN2000</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/#comment-113966</link>
		<dc:creator>ToddN2000</dc:creator>
		<pubDate>Tue, 04 Dec 2012 16:25:50 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/perfrmance-improvement-rpgle/#comment-113966</guid>
		<description><![CDATA[If you are using any SETLL, READE, DOW or DOU check to seek if your key can be modified to cut down the number of I/O&#039;s being done.&#160;For example if &#160;the current code does a SETLL then READE on CUST#&#160;&#160;you may want to expand it to CUST#, DIVISION...&#160;You may need a few new logicals but it should help with performance.]]></description>
		<content:encoded><![CDATA[<p>If you are using any SETLL, READE, DOW or DOU check to seek if your key can be modified to cut down the number of I/O&#8217;s being done.&nbsp;For example if &nbsp;the current code does a SETLL then READE on CUST#&nbsp;&nbsp;you may want to expand it to CUST#, DIVISION&#8230;&nbsp;You may need a few new logicals but it should help with performance.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/8 queries in 0.039 seconds using memcached
Object Caching 395/396 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-06-20 08:25:58 -->