<?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: PUT FUNCTION OPTIMIZATION in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PUT-FUNCTION-OPTIMIZATION/m-p/247313#M46354</link>
    <description>&lt;P&gt;There's an example in the following PDF&amp;nbsp;on how to add Other to your dataset, see the example on page 6.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/forum2007/068-2007.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2007/068-2007.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Feb 2016 21:12:50 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-02-01T21:12:50Z</dc:date>
    <item>
      <title>PUT FUNCTION OPTIMIZATION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PUT-FUNCTION-OPTIMIZATION/m-p/247255#M46322</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello ,&lt;/P&gt;&lt;P&gt;I have the following "NOTE" after trying to apply the PUT function to a dataset.&lt;/P&gt;&lt;P&gt;Can i ignore the NOTE???&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*Format */&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;sort&lt;/STRONG&gt; data=order_proc_quest2(keep=enc_id) out=order_proc_quest2_out nodupkey;&lt;/P&gt;&lt;P&gt;by enc_id;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; order_proc_quest2_out_formats;&lt;/P&gt;&lt;P&gt;set order_proc_quest2_out(rename=(enc_id=start));&lt;/P&gt;&lt;P&gt;label="true";&lt;/P&gt;&lt;P&gt;fmtname="csnid";&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;format&lt;/STRONG&gt; cntlin=order_proc_quest2_out_formats;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;sql&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;create table inp_encs as&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;from&lt;/P&gt;&lt;P&gt;pat_enc_hsp(keep=ENC_ID HSP_ACCOUNT_ID) as pat_enc_hsp,&lt;/P&gt;&lt;P&gt;HSP_ACCOUNT (keep=hsp_account_id ) as hsp_acct&lt;/P&gt;&lt;P&gt;where pat_enc_hsp.HSP_ACCOUNT_ID=hsp_acct.hsp_account_id and&lt;/P&gt;&lt;P&gt;put(pat_enc_hsp.enc_id,csnid.) = "true";&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&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;&lt;P&gt;NOTE: Optimization for the PUT function was skipped because the referenced format, CSNID, does&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; not have an OTHER= range defined.&lt;/P&gt;&lt;P&gt;NOTE: Table WORK.INP_ENCS created, with &lt;STRONG&gt;3086&lt;/STRONG&gt; rows and &lt;STRONG&gt;7&lt;/STRONG&gt; columns.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 17:30:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PUT-FUNCTION-OPTIMIZATION/m-p/247255#M46322</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2016-02-01T17:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: PUT FUNCTION OPTIMIZATION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PUT-FUNCTION-OPTIMIZATION/m-p/247260#M46325</link>
      <description>&lt;P&gt;Haven't seen that one before.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you considered adding the other? How do you want to handle values that don't match anything in your list?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 17:54:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PUT-FUNCTION-OPTIMIZATION/m-p/247260#M46325</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-01T17:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: PUT FUNCTION OPTIMIZATION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PUT-FUNCTION-OPTIMIZATION/m-p/247285#M46340</link>
      <description>&lt;P&gt;I havent tried the other=option. In fact i dont know how to use it&amp;nbsp;within this logic.&lt;/P&gt;&lt;P&gt;Also i am not interested in the ones that does not fall within that format. I want to pull only the ones which match up with those in the format.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 19:18:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PUT-FUNCTION-OPTIMIZATION/m-p/247285#M46340</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2016-02-01T19:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: PUT FUNCTION OPTIMIZATION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PUT-FUNCTION-OPTIMIZATION/m-p/247302#M46349</link>
      <description>&lt;P&gt;A simple modification to your current custom format would be to add&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OTHER= ' '&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to the format definition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then any value other than the ones you have currently defined would get a value of blank. Since you are comparing for equal to 'true' then the additional description would not be 'true' and those would not be selected.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 20:08:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PUT-FUNCTION-OPTIMIZATION/m-p/247302#M46349</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-02-01T20:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: PUT FUNCTION OPTIMIZATION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PUT-FUNCTION-OPTIMIZATION/m-p/247313#M46354</link>
      <description>&lt;P&gt;There's an example in the following PDF&amp;nbsp;on how to add Other to your dataset, see the example on page 6.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/forum2007/068-2007.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2007/068-2007.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 21:12:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PUT-FUNCTION-OPTIMIZATION/m-p/247313#M46354</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-01T21:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: PUT FUNCTION OPTIMIZATION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PUT-FUNCTION-OPTIMIZATION/m-p/247329#M46358</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thansk for the response. Using any of the three options specified below would give me the same NOTE as OPTIMIZATION ERROR!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*Format */&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;sort&lt;/STRONG&gt; data=order_proc_quest2(keep=enc_id) out=order_proc_quest2_out nodupkey;&lt;/P&gt;&lt;P&gt;by enc_id;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; order_proc_quest2_out_formats;&lt;/P&gt;&lt;P&gt;set order_proc_quest2_out(rename=(enc_id=start));&lt;/P&gt;&lt;P&gt;label="true";&lt;/P&gt;&lt;P&gt;fmtname="csnid";&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;other='O';&amp;nbsp; /&amp;nbsp; HLO='O'; /&amp;nbsp;&amp;nbsp; Other=''&lt;/STRONG&gt; ;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;format&lt;/STRONG&gt; cntlin=order_proc_quest2_out_formats;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 22:11:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PUT-FUNCTION-OPTIMIZATION/m-p/247329#M46358</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2016-02-01T22:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: PUT FUNCTION OPTIMIZATION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PUT-FUNCTION-OPTIMIZATION/m-p/247332#M46359</link>
      <description>&lt;P&gt;Post your full code/log using the HLO option please.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Make sure to follow the example and the fact that it's only created at the end or beginning.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 22:19:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PUT-FUNCTION-OPTIMIZATION/m-p/247332#M46359</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-01T22:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: PUT FUNCTION OPTIMIZATION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PUT-FUNCTION-OPTIMIZATION/m-p/247333#M46360</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31685"&gt;@robertrao﻿&lt;/a&gt;:&amp;nbsp;A quick web search for "Optimization for the put function" yields three papers and&amp;nbsp;&lt;A href="http://support.sas.com/kb/48/735.html" target="_blank"&gt;SAS Problem Note 48735&lt;/A&gt;. The latter has&amp;nbsp;a misleading title, but it states: "&lt;SPAN&gt;The query will generate correct results. You can ignore the note."&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As far as I see from the abovementioned resources, this note is linked to SAS/ACCESS Interface to some database, which was not clear to me from your post. It has to do with what they call "unPUT optimization," i.e. the conversion of PUT function calls in SQL queries into expressions (e.g. using CASE/WHEN/ELSE) which can be evaluated by the database (thus improving performance). If the note appears, this means that the query "was instead processed by SAS."&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 22:21:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PUT-FUNCTION-OPTIMIZATION/m-p/247333#M46360</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-02-01T22:21:43Z</dc:date>
    </item>
  </channel>
</rss>

