<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic _IORC_ Loop in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/IORC-Loop/m-p/486789#M15163</link>
    <description>&lt;P&gt;I'm working with Hash Tables and I'm doing multiple lookups...I'm trying to understand this code below. What is the use of Do loop increment by 0?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought IORC is allocated an automatic code? If so, then why say IORC=find()? Any help will be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;set Base_2 ;&lt;BR /&gt;do _iorc_ = b.find() by 0 while (_iorc_ = 0) ;&lt;BR /&gt;output ;&lt;BR /&gt;_iorc_ = b.find_next() ;&lt;BR /&gt;end ;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Aug 2018 19:30:03 GMT</pubDate>
    <dc:creator>jpm2478</dc:creator>
    <dc:date>2018-08-14T19:30:03Z</dc:date>
    <item>
      <title>_IORC_ Loop</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/IORC-Loop/m-p/486789#M15163</link>
      <description>&lt;P&gt;I'm working with Hash Tables and I'm doing multiple lookups...I'm trying to understand this code below. What is the use of Do loop increment by 0?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought IORC is allocated an automatic code? If so, then why say IORC=find()? Any help will be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;set Base_2 ;&lt;BR /&gt;do _iorc_ = b.find() by 0 while (_iorc_ = 0) ;&lt;BR /&gt;output ;&lt;BR /&gt;_iorc_ = b.find_next() ;&lt;BR /&gt;end ;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 19:30:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/IORC-Loop/m-p/486789#M15163</guid>
      <dc:creator>jpm2478</dc:creator>
      <dc:date>2018-08-14T19:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: _IORC_ Loop</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/IORC-Loop/m-p/486795#M15164</link>
      <description>&lt;P&gt;Looks like somebody's following PD's style of programming or his book alongside me :). AFIK, The _iorc_ variable is freely available&amp;nbsp; automatic variable unless referencing an index and is automatically dropped. Here the usage is pretty much for that very purpose.&amp;nbsp; The initial index value would be 0 if true and the loop will only execute if the same is 0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then, the need is to find and retrieve the data portion to the PDV from the hash object within the key item operation, therefore as you loop through the multiple items for the same key, you can't have the _iorc_ variable incrementing by any number until a full pass of a key multiple data item is complete.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Soon as the pointer moves past the key item, it sets return code _iorc_ to a non zero value and the loop stops. You can also use&lt;/P&gt;
&lt;P&gt;return code rc or any other variable as return code like&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;do rc= b.find() by 0 while (rc= 0) ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;output ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rc= b.find_next() ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;end ;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;however you may have to drop the variable though from the output dataset. Wish I could use the same words as PD does but that's copyrighted material.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 19:51:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/IORC-Loop/m-p/486795#M15164</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-08-14T19:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: _IORC_ Loop</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/IORC-Loop/m-p/486832#M15168</link>
      <description>&lt;P&gt;What is the use of increment by 0?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 20:42:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/IORC-Loop/m-p/486832#M15168</guid>
      <dc:creator>jpm2478</dc:creator>
      <dc:date>2018-08-14T20:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: _IORC_ Loop</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/IORC-Loop/m-p/486834#M15169</link>
      <description>&lt;P&gt;it doesn't increment, the by 0 makes sure the loop operation continues/works&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;do rc= b.find() by 0 while (rc= 0) ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;output ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rc= b.find_next() ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;end ;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is&amp;nbsp;&amp;nbsp;exactly the equivalent of&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;rc=b.find();&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;do&amp;nbsp; while (rc= 0) ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;output ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rc= b.find_next() ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;end ;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 20:48:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/IORC-Loop/m-p/486834#M15169</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-08-14T20:48:05Z</dc:date>
    </item>
  </channel>
</rss>

