<?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: Need help in  SAS query in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-help-in-SAS-query/m-p/357488#M83931</link>
    <description>&lt;P&gt;You have got your answers from the others, you should attempt a little to make the discussion interesting. Anyway, here you go:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; want&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token keyword"&gt;drop&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; i&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="token keyword"&gt;set&lt;/SPAN&gt; have&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="token statement"&gt;array&lt;/SPAN&gt; wras&lt;SPAN class="token punctuation"&gt;[&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;*&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;]&lt;/SPAN&gt; WRA1&lt;SPAN class="token operator"&gt;-&lt;/SPAN&gt;WRA90&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;if upcase(model_type)='BUSINESS' then do;&lt;/STRONG&gt;&lt;BR /&gt;do i &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;1&lt;/SPAN&gt; to &lt;SPAN class="token function"&gt;dim&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;wras&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt; wras&lt;SPAN class="token punctuation"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="token punctuation"&gt;]&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;then&lt;/SPAN&gt; wras&lt;SPAN class="token punctuation"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="token punctuation"&gt;]&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;0&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;end&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 10 May 2017 14:21:52 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2017-05-10T14:21:52Z</dc:date>
    <item>
      <title>Need help in  SAS query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-in-SAS-query/m-p/357468#M83925</link>
      <description>&lt;P&gt;I need to change data in my numeric columns named NUM1-NUM90 (90 columns).&lt;/P&gt;&lt;P&gt;Whereever its '.' i need to replace it with '0'&lt;/P&gt;&lt;P&gt;Also tthere is a where clause to select model_type.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example..the query should be: In a dataset for model_type='Business' &amp;nbsp;set all '.' values to '0' for &amp;nbsp;columns(WRA1-WRA90) .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me have a query or suggestion,how to take care of this.Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 13:30:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-in-SAS-query/m-p/357468#M83925</guid>
      <dc:creator>srdhoble</dc:creator>
      <dc:date>2017-05-10T13:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in  SAS query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-in-SAS-query/m-p/357471#M83926</link>
      <description>&lt;P&gt;Apply this simple example of 3 columns to your 90 and add a where clause where needed&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input WRA1-WRA3;
datalines;
1 2 .
. 4 6
4 . 9
;

data want(drop = i);
	set have;
	array wras[*] WRA1-WRA3;

	do i = 1 to dim(wras);
		if wras[i] = . then wras[i] = 0;
	end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 13:36:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-in-SAS-query/m-p/357471#M83926</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-05-10T13:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in  SAS query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-in-SAS-query/m-p/357473#M83927</link>
      <description>&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; array wr {90} wra1-wra90;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;do i=1 to 90; if wr(i)=. then wr(i)=0; end;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 13:38:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-in-SAS-query/m-p/357473#M83927</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-05-10T13:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in  SAS query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-in-SAS-query/m-p/357481#M83928</link>
      <description>&lt;P&gt;Where will i have Where clause for Model_type= Business ?&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 13:55:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-in-SAS-query/m-p/357481#M83928</guid>
      <dc:creator>srdhoble</dc:creator>
      <dc:date>2017-05-10T13:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in  SAS query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-in-SAS-query/m-p/357487#M83930</link>
      <description>&lt;PRE&gt;data want;
   set have;
   array wr {90} wra1-wra90;
   id model_type eq 'Business' then do;
      do i=1 to 90;
        if missing(wr(i)) then wr(i)=0;
     end;
  end;
run;&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 14:19:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-in-SAS-query/m-p/357487#M83930</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-05-10T14:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in  SAS query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-in-SAS-query/m-p/357488#M83931</link>
      <description>&lt;P&gt;You have got your answers from the others, you should attempt a little to make the discussion interesting. Anyway, here you go:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; want&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token keyword"&gt;drop&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; i&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="token keyword"&gt;set&lt;/SPAN&gt; have&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="token statement"&gt;array&lt;/SPAN&gt; wras&lt;SPAN class="token punctuation"&gt;[&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;*&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;]&lt;/SPAN&gt; WRA1&lt;SPAN class="token operator"&gt;-&lt;/SPAN&gt;WRA90&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;if upcase(model_type)='BUSINESS' then do;&lt;/STRONG&gt;&lt;BR /&gt;do i &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;1&lt;/SPAN&gt; to &lt;SPAN class="token function"&gt;dim&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;wras&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt; wras&lt;SPAN class="token punctuation"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="token punctuation"&gt;]&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;then&lt;/SPAN&gt; wras&lt;SPAN class="token punctuation"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="token punctuation"&gt;]&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;0&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;end&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 14:21:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-in-SAS-query/m-p/357488#M83931</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2017-05-10T14:21:52Z</dc:date>
    </item>
  </channel>
</rss>

