 




<?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: SETLL and READE or CHAIN? Performance Issues</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/setll-and-reade-or-chain-performance-issues/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/setll-and-reade-or-chain-performance-issues/</link>
	<description></description>
	<lastBuildDate>Sun, 19 May 2013 03:14:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: splat</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/setll-and-reade-or-chain-performance-issues/#comment-71633</link>
		<dc:creator>splat</dc:creator>
		<pubDate>Tue, 15 Dec 2009 15:33:02 +0000</pubDate>
		<guid isPermaLink="false">#comment-71633</guid>
		<description><![CDATA[The difference between SETLL and CHAIN to position a file cursor is that SETLL doesn&#039;t load the buffer.]]></description>
		<content:encoded><![CDATA[<p>The difference between SETLL and CHAIN to position a file cursor is that SETLL doesn&#8217;t load the buffer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vatchy</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/setll-and-reade-or-chain-performance-issues/#comment-71557</link>
		<dc:creator>vatchy</dc:creator>
		<pubDate>Mon, 14 Dec 2009 15:36:04 +0000</pubDate>
		<guid isPermaLink="false">#comment-71557</guid>
		<description><![CDATA[It probably could be just a matter of style but it can also be clarity.

If I see a SETLL and then a READE then I will be looking for the loop where I would expect to find processing on the record and then another READE.]]></description>
		<content:encoded><![CDATA[<p>It probably could be just a matter of style but it can also be clarity.</p>
<p>If I see a SETLL and then a READE then I will be looking for the loop where I would expect to find processing on the record and then another READE.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/setll-and-reade-or-chain-performance-issues/#comment-71542</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Mon, 14 Dec 2009 07:46:10 +0000</pubDate>
		<guid isPermaLink="false">#comment-71542</guid>
		<description><![CDATA[There is no reason to avoid CHAIN plus READE. It can in fact work better than SETLL plus READE.

There is a programming &#039;style&#039; element that prevents some developers from using CHAIN to prime a READE loop, but it is purely a matter of style. There is no logic to it.

Tom]]></description>
		<content:encoded><![CDATA[<p>There is no reason to avoid CHAIN plus READE. It can in fact work better than SETLL plus READE.</p>
<p>There is a programming &#8216;style&#8217; element that prevents some developers from using CHAIN to prime a READE loop, but it is purely a matter of style. There is no logic to it.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: burtnoir</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/setll-and-reade-or-chain-performance-issues/#comment-47479</link>
		<dc:creator>burtnoir</dc:creator>
		<pubDate>Wed, 16 Aug 2006 09:31:24 +0000</pubDate>
		<guid isPermaLink="false">#comment-47479</guid>
		<description><![CDATA[The previous response reminded me of a situation I once discovered in a program that was taking far too long to process a record.

In my case the program was using a setll / reade type loop to look for a particular record it needed.  However, once it found the record it carried on processing the loop until the end of the file!  

Make sure that your program recognises when it has the data it needs and finishes the loop or at least issues another setll with the next key to be processed.

hope that helps.]]></description>
		<content:encoded><![CDATA[<p>The previous response reminded me of a situation I once discovered in a program that was taking far too long to process a record.</p>
<p>In my case the program was using a setll / reade type loop to look for a particular record it needed.  However, once it found the record it carried on processing the loop until the end of the file!  </p>
<p>Make sure that your program recognises when it has the data it needs and finishes the loop or at least issues another setll with the next key to be processed.</p>
<p>hope that helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ddune3566</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/setll-and-reade-or-chain-performance-issues/#comment-47480</link>
		<dc:creator>ddune3566</dc:creator>
		<pubDate>Tue, 15 Aug 2006 13:47:45 +0000</pubDate>
		<guid isPermaLink="false">#comment-47480</guid>
		<description><![CDATA[All of the other suggestions are good ones.  Not enough disk space can slow things down. 

I don&#039;t know enough about your application to give a good answer.

I would try putting the program in debug and see how many lines of code are processed in between your reade commands.

If the file your are refering to is a master file and it is looking through a lot of detail and support files and reads these files and loops through code to process them 
 this all can slow down the reads on the master file]]></description>
		<content:encoded><![CDATA[<p>All of the other suggestions are good ones.  Not enough disk space can slow things down. </p>
<p>I don&#8217;t know enough about your application to give a good answer.</p>
<p>I would try putting the program in debug and see how many lines of code are processed in between your reade commands.</p>
<p>If the file your are refering to is a master file and it is looking through a lot of detail and support files and reads these files and loops through code to process them<br />
 this all can slow down the reads on the master file</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: byimw02</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/setll-and-reade-or-chain-performance-issues/#comment-47481</link>
		<dc:creator>byimw02</dc:creator>
		<pubDate>Mon, 14 Aug 2006 13:59:53 +0000</pubDate>
		<guid isPermaLink="false">#comment-47481</guid>
		<description><![CDATA[From the information you provided, there may be performance issues outside of the RPG program logic.  One second/record is not plausible for any HLL program. Changing the run priority and timeslice is the last adjustment needed.  I would check if the logical maintenance parameters of the file being updated.  Is the logical you are using set to *IMMED? If not, this can affect performance.  Also are any other apps using the same file?  There may be file or record lock issues.  I would check for any DB issues before tinkering with the RPG program which may not yield any performance increases.]]></description>
		<content:encoded><![CDATA[<p>From the information you provided, there may be performance issues outside of the RPG program logic.  One second/record is not plausible for any HLL program. Changing the run priority and timeslice is the last adjustment needed.  I would check if the logical maintenance parameters of the file being updated.  Is the logical you are using set to *IMMED? If not, this can affect performance.  Also are any other apps using the same file?  There may be file or record lock issues.  I would check for any DB issues before tinkering with the RPG program which may not yield any performance increases.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ayahel1</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/setll-and-reade-or-chain-performance-issues/#comment-47482</link>
		<dc:creator>ayahel1</dc:creator>
		<pubDate>Fri, 11 Aug 2006 14:53:59 +0000</pubDate>
		<guid isPermaLink="false">#comment-47482</guid>
		<description><![CDATA[You may also uthe SETOBJACC command.
It allows you to &quot;load&quot; and object (*FILE or *PGM) to a subsystem memory pool.
If a *FILE, allocate large amount of memory for the subsystem so larger portion of the file is loaded each time.]]></description>
		<content:encoded><![CDATA[<p>You may also uthe SETOBJACC command.<br />
It allows you to &#8220;load&#8221; and object (*FILE or *PGM) to a subsystem memory pool.<br />
If a *FILE, allocate large amount of memory for the subsystem so larger portion of the file is loaded each time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: beaufort</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/setll-and-reade-or-chain-performance-issues/#comment-47483</link>
		<dc:creator>beaufort</dc:creator>
		<pubDate>Fri, 11 Aug 2006 11:06:36 +0000</pubDate>
		<guid isPermaLink="false">#comment-47483</guid>
		<description><![CDATA[Hello All - If the programmer is using SETLL and READE to get a single record you could change the program to CHAIN and get quicker results.  The SETLL and READE is good only for situations where you need to read a group of records with the same properties (all records that have the same territory ID for example).  The CHAIN will work better.

Also, make sure your file is reorgaized so that all deleted records are removed.  RGZPFM can be used.  

Finally, the creation of the file uses a parameter called &#039;Records to Force a write&#039;.  Check this parameter to make sure you are not forcing disk writes each time you write the record.  

And - reduce the logical files (DSPDBR) on the physical file, update the physical - not the logical.  And - look at the access path maintenance parameters for the physical and logical files.

With all of that you might have some luck - memory on the machine is important to consider as well - you might speed disk writes with better memory allocation / faster disk although now we are getting into some larger expense.

Good Luck]]></description>
		<content:encoded><![CDATA[<p>Hello All &#8211; If the programmer is using SETLL and READE to get a single record you could change the program to CHAIN and get quicker results.  The SETLL and READE is good only for situations where you need to read a group of records with the same properties (all records that have the same territory ID for example).  The CHAIN will work better.</p>
<p>Also, make sure your file is reorgaized so that all deleted records are removed.  RGZPFM can be used.  </p>
<p>Finally, the creation of the file uses a parameter called &#8216;Records to Force a write&#8217;.  Check this parameter to make sure you are not forcing disk writes each time you write the record.  </p>
<p>And &#8211; reduce the logical files (DSPDBR) on the physical file, update the physical &#8211; not the logical.  And &#8211; look at the access path maintenance parameters for the physical and logical files.</p>
<p>With all of that you might have some luck &#8211; memory on the machine is important to consider as well &#8211; you might speed disk writes with better memory allocation / faster disk although now we are getting into some larger expense.</p>
<p>Good Luck</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mariusm</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/setll-and-reade-or-chain-performance-issues/#comment-47484</link>
		<dc:creator>mariusm</dc:creator>
		<pubDate>Thu, 10 Aug 2006 08:40:18 +0000</pubDate>
		<guid isPermaLink="false">#comment-47484</guid>
		<description><![CDATA[Hi,

The CHAIN command does a SETLL and a READE in order to find a match.  

CHAIN is best used to locate a unique record (like a customer record)

SETLL with READE is best used when there can be more than one record found.  For example, you can find multiple customer orders in your system for one unique customer.

I am not positive, but I would think that there could be a minor performance issue only if you are using the CHAIN command to locate all the orders for a particular customer instead of using the SETLL/READE commands.

Increasing the priority of the job only makes it get processed sooner.   

After the job has been submitted, try increasing the &quot;TIMESLICE&quot; parameter.  TIMESLICE (in milliseconds) is the amount of time the computer will work on your job.  If it does not complete your job within the default TIMESLICE value, it will work on another job and then come back to yours.  If there are lots of submitted jobs in the system at the same time, the computer will alternate between jobs for the amount of time specified in the TIMESLICE parameter until all jobs are complete.  So ... if you double the TIMESLICE parameter value 

Try this:
  1) WRKSBMJOB and press ENTER to see the list of currently running jobs you have in the system
  2) Find the job you want, enter 2 as your option (CHGJOB) and press F4 to get prompted for the parameters.
  3) Go to the 3rd screen and look at the top of the page for the word TIMESLICE.
  4) Double the value and your job should only take half the time required to finish the job now. 

Hope this helps ... it&#039;s all I can think of at the moment.  Hve a nice day.

Regards ...
]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>The CHAIN command does a SETLL and a READE in order to find a match.  </p>
<p>CHAIN is best used to locate a unique record (like a customer record)</p>
<p>SETLL with READE is best used when there can be more than one record found.  For example, you can find multiple customer orders in your system for one unique customer.</p>
<p>I am not positive, but I would think that there could be a minor performance issue only if you are using the CHAIN command to locate all the orders for a particular customer instead of using the SETLL/READE commands.</p>
<p>Increasing the priority of the job only makes it get processed sooner.   </p>
<p>After the job has been submitted, try increasing the &#8220;TIMESLICE&#8221; parameter.  TIMESLICE (in milliseconds) is the amount of time the computer will work on your job.  If it does not complete your job within the default TIMESLICE value, it will work on another job and then come back to yours.  If there are lots of submitted jobs in the system at the same time, the computer will alternate between jobs for the amount of time specified in the TIMESLICE parameter until all jobs are complete.  So &#8230; if you double the TIMESLICE parameter value </p>
<p>Try this:<br />
  1) WRKSBMJOB and press ENTER to see the list of currently running jobs you have in the system<br />
  2) Find the job you want, enter 2 as your option (CHGJOB) and press F4 to get prompted for the parameters.<br />
  3) Go to the 3rd screen and look at the top of the page for the word TIMESLICE.<br />
  4) Double the value and your job should only take half the time required to finish the job now. </p>
<p>Hope this helps &#8230; it&#8217;s all I can think of at the moment.  Hve a nice day.</p>
<p>Regards &#8230;</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/10 queries in 0.046 seconds using memcached
Object Caching 379/385 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-19 07:43:17 -->