<?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: Conditionals and Named Range in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Conditionals-and-Named-Range/m-p/103455#M21593</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No array().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;infile cards truncover;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input (x1-x3) (2.) some_number;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;. . . .&lt;/P&gt;&lt;P&gt;. . . 3&lt;/P&gt;&lt;P&gt;. . . 4&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql NOPRINT;&lt;/P&gt;&lt;P&gt;select cats('',name,'','=','0')&amp;nbsp; into :lst separated by '; ' from dictionary.columns where libname='WORK' AND MEMNAME='HAVE' and name ne 'some_number';&amp;nbsp;&amp;nbsp;&amp;nbsp; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if some_number &amp;gt; 0 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;lst;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Jul 2012 14:33:33 GMT</pubDate>
    <dc:creator>Haikuo</dc:creator>
    <dc:date>2012-07-10T14:33:33Z</dc:date>
    <item>
      <title>Conditionals and Named Range</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conditionals-and-Named-Range/m-p/103453#M21591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have a data set with a named range that has a bunch of missing values. i want to fill in those missing values based off a condition of another variable (not in the named range). i know how to do this using array processing but was wondering if it is possible to do so in the way i've outline below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a fictitious data set to simplify my problem,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input (x1-x3) (2.) some_number;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;. . . .&lt;/P&gt;&lt;P&gt;. . . 3&lt;/P&gt;&lt;P&gt;. . . 4&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if some_number &amp;gt; 0 then (x1-x3) = 0;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2012 14:09:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conditionals-and-Named-Range/m-p/103453#M21591</guid>
      <dc:creator>SAShole</dc:creator>
      <dc:date>2012-07-10T14:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionals and Named Range</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conditionals-and-Named-Range/m-p/103454#M21592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; X2Zero;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;if&lt;/SPAN&gt; &lt;STRONG style="color: teal; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;then&lt;/SPAN&gt; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; have(keep=x:);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;retain&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; _all_ &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;stop&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;modify&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; some_number gt &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;then&lt;/SPAN&gt; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; point=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; X2Zero point=point;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;replace&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;print&lt;/STRONG&gt; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;=have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2012 14:32:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conditionals-and-Named-Range/m-p/103454#M21592</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2012-07-10T14:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionals and Named Range</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conditionals-and-Named-Range/m-p/103455#M21593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No array().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;infile cards truncover;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input (x1-x3) (2.) some_number;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;. . . .&lt;/P&gt;&lt;P&gt;. . . 3&lt;/P&gt;&lt;P&gt;. . . 4&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql NOPRINT;&lt;/P&gt;&lt;P&gt;select cats('',name,'','=','0')&amp;nbsp; into :lst separated by '; ' from dictionary.columns where libname='WORK' AND MEMNAME='HAVE' and name ne 'some_number';&amp;nbsp;&amp;nbsp;&amp;nbsp; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if some_number &amp;gt; 0 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;lst;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2012 14:33:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conditionals-and-Named-Range/m-p/103455#M21593</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-07-10T14:33:33Z</dc:date>
    </item>
  </channel>
</rss>

