<?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: Array in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Array/m-p/60789#M13208</link>
    <description>Thank you very much Patrick...</description>
    <pubDate>Tue, 23 Feb 2010 05:19:37 GMT</pubDate>
    <dc:creator>syam_india_kochi</dc:creator>
    <dc:date>2010-02-23T05:19:37Z</dc:date>
    <item>
      <title>Array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array/m-p/60787#M13206</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
In one of my data set I have 37 numeric columns out which, one numeric column is in date format.&lt;BR /&gt;
&lt;BR /&gt;
My requirement was to replace all the null values(.) from the data set with zeros and I had used the following array&lt;BR /&gt;
&lt;BR /&gt;
data liab_asset1;&lt;BR /&gt;
set liab_asset;&lt;BR /&gt;
array v(*) _numeric_;&lt;BR /&gt;
do i = 1 to dim(v);&lt;BR /&gt;
if v(i) = . then v(i) = 0;&lt;BR /&gt;
end;&lt;BR /&gt;
drop i;&lt;BR /&gt;
run; &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
But this statement replaces all the null fields from the date field also. If i dont want to do any action on the date field how should I write the query..?&lt;BR /&gt;
&lt;BR /&gt;
Please help..!!</description>
      <pubDate>Mon, 22 Feb 2010 08:01:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array/m-p/60787#M13206</guid>
      <dc:creator>syam_india_kochi</dc:creator>
      <dc:date>2010-02-22T08:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array/m-p/60788#M13207</link>
      <description>From a performance point of view there will be better solutions but below approach means only small changes to your existing code.&lt;BR /&gt;
Make sure to write the name of the var to exclude in capital letters.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data liab_asset1;&lt;BR /&gt;
  set liab_asset;&lt;BR /&gt;
  array v(*) _numeric_;&lt;BR /&gt;
  do i = 1 to dim(v);&lt;BR /&gt;
    if vname(v(i)) ne '&lt;NAME of="" numeric="" var=""&gt;' and v(i) = . &lt;BR /&gt;
      then v(i) = 0;&lt;BR /&gt;
  end;&lt;BR /&gt;
  drop i;&lt;BR /&gt;
run; &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
SAS knows only 2 datatypes: Numeric and character. A SAS date is stored as a number in a numeric variable - and this number then "interpreted" by applying an appropriate date format.&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick&lt;/NAME&gt;</description>
      <pubDate>Mon, 22 Feb 2010 09:29:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array/m-p/60788#M13207</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2010-02-22T09:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array/m-p/60789#M13208</link>
      <description>Thank you very much Patrick...</description>
      <pubDate>Tue, 23 Feb 2010 05:19:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array/m-p/60789#M13208</guid>
      <dc:creator>syam_india_kochi</dc:creator>
      <dc:date>2010-02-23T05:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: Array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array/m-p/60790#M13209</link>
      <description>Thank you very much Patrick...</description>
      <pubDate>Tue, 23 Feb 2010 05:26:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array/m-p/60790#M13209</guid>
      <dc:creator>syam_india_kochi</dc:creator>
      <dc:date>2010-02-23T05:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array/m-p/60791#M13210</link>
      <description>As a more direct alternative, consider using the VFORMAT function instead, presuming your SAS DATE variable has a SAS date-type output FORMAT associated.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 23 Feb 2010 14:40:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array/m-p/60791#M13210</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-02-23T14:40:50Z</dc:date>
    </item>
  </channel>
</rss>

