<?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 Re: Not famillar with _IORC_ in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Not-famillar-with-IORC/m-p/977097#M46210</link>
    <description>&lt;P&gt;The WARNING is a result of preceding ERRORs, usually caused by invalid data. You need to check those.&lt;/P&gt;
&lt;P&gt;I think that a _IORC_ value of zero means success, but that's a guess. As described in the documentation I linked, use %SYSRC to see the real numeric value for SOK.&lt;/P&gt;</description>
    <pubDate>Wed, 15 Oct 2025 21:01:40 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2025-10-15T21:01:40Z</dc:date>
    <item>
      <title>Not famillar with _IORC_</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Not-famillar-with-IORC/m-p/977084#M46207</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not famillar with _IORC_ at all and trying to understand the logic of a SAS developper absent for few months.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC DATASETS NOLIST LIBRARY= temp;
MODIFY histo_gc_auto_norisk;
/* INDEX DELETE _ALL_;*/
INDEX CREATE COMPKEY=(AGREEMENT_NBR DATEMISS DATECHEA) / UNIQUE NOMISS;
RUN;

DATA TEMP.Auto TEMP.A;
set TEMP.A;  
RCLASS3=RCLASS2;   
if RCLASS2 NE 'PERSAUTO' THEN OUTPUT;
ELSE DO;
     SET temp.histo_gc_auto_norisk KEY=COMPKEY/UNIQUE;
     IF _IORC_ THEN 
          DO;
               OUTPUT;
          END;
     ELSE 
          DO;
               RCLASS2 ='COMMAUTO';
               RCLASS2P='COMMIRCA';
               OUTPUT;
          END;	 
END; 
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The begining seems strange:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;DATA TEMP.Auto TEMP.A;
set TEMP.A; &lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;and&amp;nbsp;based&amp;nbsp;on&amp;nbsp;the&amp;nbsp;script&amp;nbsp;everything&amp;nbsp;goes&amp;nbsp;in&amp;nbsp;both&amp;nbsp;datasets.&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;Does&amp;nbsp;someone&amp;nbsp;can&amp;nbsp;help&amp;nbsp;me&amp;nbsp;with&amp;nbsp;that?&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2025 12:46:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Not-famillar-with-IORC/m-p/977084#M46207</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2025-10-16T12:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: Not famillar with _IORC_</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Not-famillar-with-IORC/m-p/977091#M46208</link>
      <description>&lt;P&gt;As you observe, the DATA step creates two identical datasets (none of the OUTPUT statements is tied to a specific dataset).&lt;/P&gt;
&lt;P&gt;It uses a SET with KEY and checks the automatic variable _IORC_ for a non-zero value (= true) to do nothing, or set two variables in case of a zero value (= false). According to&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lepg/n1kur3bt5u9wzxn1ak2wfckk61aj.htm" target="_blank" rel="noopener"&gt;this&lt;/A&gt;, this usage is not completely future-proof.&lt;/P&gt;
&lt;P&gt;I guess(!) that the variables need to be set if a match is found. Today, I would use a hash object for this.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Oct 2025 20:25:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Not-famillar-with-IORC/m-p/977091#M46208</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2025-10-15T20:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Not famillar with _IORC_</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Not-famillar-with-IORC/m-p/977095#M46209</link>
      <description>&lt;P&gt;so, if we make the hypothesis that records with none unique key get a _IORC_ value of zero because for the same agreement_nbr they have multiple datemiss and datechea, and in that case the two variables RCLASS2 AND RCLASS2P need to be remapped to new values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and how to deal with warning ?&lt;BR /&gt;&lt;BR /&gt;WARNING: Limit set by ERRORS= option reached. Further errors of this type will not be printed.&lt;BR /&gt;GCNA_BRANCH= DATECHEA=25-11-04 DATEMISS=24-11-04 DATANNUL=. ASSPREC=WA BASETAR=1 CIEDISTR= CODEFPQ=1 COURTIER=0024 DATEORIG=201811&lt;BR /&gt;AGREEMENT_NBR=aaa-4315 POL_SYNC=M27-9337 POL_TEST= PRIMANNU=775 PROFGAFF=SECRETAIRE COMPTABLE RAIS_SOC=IN SECTASSU=P SERVICE= &lt;BR /&gt;SOURCAFF=N STATUT=N TERR_REP=04 POLICE=aaa315- TERME=- PROVINCE=QC POL_CONV=P BROKER_GROUP_IND= PIP=1 POLICY=aaa4315 ANASS=6&lt;BR /&gt;NEWREN=R RCLASS2=COMMAUTO RCLASS2P=COMMIRCA PRIORCUR=C TRANS=DIR MOIS=202509 FPROV=QC. CIE=A TRANSFER=R RCLASS3=PERSAUTO&lt;BR /&gt;POLICY_INCEPTION_DT= POLICY_EXPIRY_DT= GENRE_GC= _ERROR_=1 _IORC_=1230015 _N_=1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to see the value of each _IORC_&lt;/P&gt;</description>
      <pubDate>Wed, 15 Oct 2025 20:53:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Not-famillar-with-IORC/m-p/977095#M46209</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2025-10-15T20:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Not famillar with _IORC_</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Not-famillar-with-IORC/m-p/977097#M46210</link>
      <description>&lt;P&gt;The WARNING is a result of preceding ERRORs, usually caused by invalid data. You need to check those.&lt;/P&gt;
&lt;P&gt;I think that a _IORC_ value of zero means success, but that's a guess. As described in the documentation I linked, use %SYSRC to see the real numeric value for SOK.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Oct 2025 21:01:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Not-famillar-with-IORC/m-p/977097#M46210</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2025-10-15T21:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: Not famillar with _IORC_</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Not-famillar-with-IORC/m-p/977149#M46213</link>
      <description>&lt;P&gt;The way to deal with that issue is to reset the _ERROR_ variable to zero (false).&lt;/P&gt;
&lt;P&gt;See Example 15 in this documentation page.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsref/p00hxg3x8lwivcn1f0e9axziw57y.htm#n0mf5ckobz31ssn1u8dye37phqr9" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsref/p00hxg3x8lwivcn1f0e9axziw57y.htm#n0mf5ckobz31ssn1u8dye37phqr9&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that this method using INDEX and the KEY= option of the SET statement to do a lookup is still valid as far as I know and the way to handle cases where the lookup dataset is too large to load into a HASH object.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2025 12:50:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Not-famillar-with-IORC/m-p/977149#M46213</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-10-16T12:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Not famillar with _IORC_</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Not-famillar-with-IORC/m-p/977151#M46214</link>
      <description>&lt;P&gt;Not sure why they are writing the same data to two different datasets.&amp;nbsp; You might find the answer to that by looking at what they do with the two datasets later in the program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Make sure to reset the _ERROR_ flag when the SET with the KEY= sets the _IORC_ flag.&lt;/P&gt;
&lt;P&gt;Here is a write up on doing look ups&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings/proceedings/sugi25/25/po/25p234.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings/proceedings/sugi25/25/po/25p234.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since all of the branches in the IF/THEN/ELSE tree have an OUTPUT statement you can just remove the OUTPUT statement and let the default output occur.&amp;nbsp; So your data step might want to look like this instead:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data temp.auto temp.a;
  set temp.a;
  rclass3=rclass2;
  if rclass2 = 'PERAUTO' then do;
    set temp.histo_gc_auto_norisk key=compkey/unique;
    if _iorc_ then do;
      _error_=0;
    end;
    else do;
      rclass2 ='COMMAUTO';
      rclass2p='COMMIRCA';
    end;
  end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2025 13:05:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Not-famillar-with-IORC/m-p/977151#M46214</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-10-16T13:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Not famillar with _IORC_</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Not-famillar-with-IORC/m-p/980509#M46305</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; DATA TEMP.Auto TEMP.A;
 	  set TEMP.A;  
 	     RCLASS3=RCLASS2;   
       if RCLASS2 NE 'PERSAUTO' THEN OUTPUT;
       ELSE DO;
              SET temp.histo_gc_auto_norisk KEY=COMPKEY/UNIQUE;
              IF _IORC_ THEN 
                  DO;
                    _error_=0;
                    OUTPUT;
                  END; 
	         ELSE 
                  DO;
	                   RCLASS2 ='COMMAUTO';
                        RCLASS2P='COMMIRCA';
	                   OUTPUT;
	             END;	 
       END;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When there is no match, the _error_=0 instruction avoid to through an error.&amp;nbsp; So we don't get any warning.&amp;nbsp; And that what we want, since this situation is already managed.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Dec 2025 19:33:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Not-famillar-with-IORC/m-p/980509#M46305</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2025-12-09T19:33:59Z</dc:date>
    </item>
  </channel>
</rss>

