<?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: Back-fill empty rows with zero values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363238#M85961</link>
    <description>&lt;P&gt;What you're doing is called a TRANSPOSE, try PROC TRANSPOSE.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use PROC TRANSPOSE and then fill the missing values. You don't need macro's here, it only confuses things.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
    informat ticker $8. date yymmn6.;
    input Ticker $ Date Returns;
    cards;
Appl   200209  0.2
Appl   200210  0.1
Appl   200211  0.21
Appl   200212  0.22
BAC   200209  0.1
BAC   200210  .
BAC   200212  0.23
C   200209  0.22
C   200210  0.11
;
run;

proc sort data=have nodupkey;
    by date ticker;
run;

proc transpose data=have out=flipped prefix=TICKER_;
    by date;
    id ticker;
    var returns;
    idlabel ticker;
run;

data final;
    set flipped;
    array _ticker(*) ticker_:;

    do i=1 to dim(_ticker);

        if _ticker(I)=. then
            _ticker(i)=0;
    end;
    drop i _name_;
    format date yymon7.;
run;

proc print data=final label noobs;
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>Wed, 31 May 2017 21:42:05 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-05-31T21:42:05Z</dc:date>
    <item>
      <title>Back-fill empty rows with zero values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363220#M85953</link>
      <description>&lt;P&gt;Dear Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a problem back-filling empty rows or rows with no values on the column, named "Returns". Here are the dataset&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Inputs:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Dataset A:&lt;/P&gt;
&lt;P&gt;Ticker Date Returns&lt;/P&gt;
&lt;P&gt;Appl &amp;nbsp; 200209 &amp;nbsp;0.2&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Appl &amp;nbsp; 200210 &amp;nbsp;0.1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Appl &amp;nbsp; 200211 &amp;nbsp;0.21&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Appl &amp;nbsp; 200212 &amp;nbsp;0.22&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;BAC &amp;nbsp; 200209 &amp;nbsp;0.1&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BAC &amp;nbsp; 200210 &amp;nbsp;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BAC &amp;nbsp; 200212 &amp;nbsp;0.23&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;C &amp;nbsp; 200209 &amp;nbsp;0.22&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;C &amp;nbsp; 200210 &amp;nbsp;0.11&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Desired Outputs&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Date &amp;nbsp; &amp;nbsp; &amp;nbsp; Appl &amp;nbsp; BAC C&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;200209 &amp;nbsp;0.2 &amp;nbsp; &amp;nbsp; 0.1 &amp;nbsp; 0.22&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;200210 &amp;nbsp;0.1 &amp;nbsp; &amp;nbsp; &lt;STRONG&gt;0&lt;/STRONG&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.11&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;200211 &amp;nbsp;0.21 &amp;nbsp; 0.23 &lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;200212 &amp;nbsp;0.22 &amp;nbsp; &lt;STRONG&gt;0&lt;/STRONG&gt; &amp;nbsp; &amp;nbsp; &lt;STRONG&gt;&amp;nbsp;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;My code:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%* Extract the full date series;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt; proc sort data=A (keep= yyyymm) nodupkey out=A1&lt;BR /&gt; by yyyymm;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let xtemplist = Appl BAC C;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt; %do k = 1 %to 3; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; %let ticker_name = %scan(&amp;amp;xtemplist,&amp;amp;k);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; %* transpose the dataset;&lt;BR /&gt;&amp;nbsp; data A;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; set A;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; if ticker = "&amp;amp;ticker_name";&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;ticker_name = returns;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; keep yyyymm &amp;amp;ticker_name;&lt;BR /&gt;&amp;nbsp;run;&lt;BR /&gt; &lt;BR /&gt;&amp;nbsp;data A1;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;merge A1(in=a) A (in=b);&lt;BR /&gt;&amp;nbsp; &amp;nbsp;by yyyymm;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;if a and b; &lt;BR /&gt;&amp;nbsp;run;&lt;BR /&gt; &lt;BR /&gt; %end;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;But the output A1:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;yyyymm Appl &amp;nbsp; BAC C&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;200209 &amp;nbsp;0.2 &amp;nbsp; &amp;nbsp; 0.1 &amp;nbsp; 0.22&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;200210 &amp;nbsp;0.1 &amp;nbsp; &amp;nbsp; . &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.11&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have any ideas how to get the desired output?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for your help&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;L&lt;/SPAN&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>Wed, 31 May 2017 20:48:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363220#M85953</guid>
      <dc:creator>CheerfulChu</dc:creator>
      <dc:date>2017-05-31T20:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: Back-fill empty rows with zero values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363231#M85957</link>
      <description>&lt;P&gt;If you ALWAYS want to replace EVERY missing numeric with 0, change the last data step to something like this. Note if you use i as a variable in any of your other datasets then come up with a different loop counter.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data A1;
   merge A1(in=a) A (in=b);
   by yyyymm;
   array _xxx_ _numeric_;
   do i=1 to dim( _xxx_);
      if missing(_xxx_[i]) then _xxx_[i]=0;
   end;
   drop i;
   if a and b; 
 run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 May 2017 21:25:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363231#M85957</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-05-31T21:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Back-fill empty rows with zero values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363232#M85958</link>
      <description>&lt;P&gt;Note if you have other variables that you don't want to change, you have an easy tweak:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;array _xxx_ {*} &amp;amp;XTEMPLIST;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, this statement is deleting mismatches:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if a and b;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like removing it will restore the missing rows.&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 21:29:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363232#M85958</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-05-31T21:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Back-fill empty rows with zero values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363238#M85961</link>
      <description>&lt;P&gt;What you're doing is called a TRANSPOSE, try PROC TRANSPOSE.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use PROC TRANSPOSE and then fill the missing values. You don't need macro's here, it only confuses things.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
    informat ticker $8. date yymmn6.;
    input Ticker $ Date Returns;
    cards;
Appl   200209  0.2
Appl   200210  0.1
Appl   200211  0.21
Appl   200212  0.22
BAC   200209  0.1
BAC   200210  .
BAC   200212  0.23
C   200209  0.22
C   200210  0.11
;
run;

proc sort data=have nodupkey;
    by date ticker;
run;

proc transpose data=have out=flipped prefix=TICKER_;
    by date;
    id ticker;
    var returns;
    idlabel ticker;
run;

data final;
    set flipped;
    array _ticker(*) ticker_:;

    do i=1 to dim(_ticker);

        if _ticker(I)=. then
            _ticker(i)=0;
    end;
    drop i _name_;
    format date yymon7.;
run;

proc print data=final label noobs;
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>Wed, 31 May 2017 21:42:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363238#M85961</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-05-31T21:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: Back-fill empty rows with zero values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363242#M85964</link>
      <description>&lt;P&gt;Your answer is good. I got all the 4 rows. The earlier answer can only give me the first two rows.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I have a problem, I cant have prefix. ie ticker_appl , ticker_bac&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to fill up the empty values if there are no label&amp;nbsp;such as a prefix, ticker_?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 21:54:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363242#M85964</guid>
      <dc:creator>CheerfulChu</dc:creator>
      <dc:date>2017-05-31T21:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Back-fill empty rows with zero values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363245#M85967</link>
      <description>&lt;P&gt;You need the variable names to manually list them in the array. This is the best way to keep it dynamic, ie you don't need to know anything about the data to have it work. The labels usually are enough to avoid this issue but if you really insist my suggestion would be to rename the variables after replacing the name with the label.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are are examples of how to do this dynamically on here if you search.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have the list of variables which you did from your code above you can use that instead in the array.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 21:58:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363245#M85967</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-05-31T21:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: Back-fill empty rows with zero values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363246#M85968</link>
      <description>&lt;P&gt;You need the variable names to manually list them in the array. This is the best way to keep it dynamic, ie you don't need to know anything about the data to have it work. The labels usually are enough to avoid this issue but if you really insist my suggestion would be to rename the variables after replacing the name with the label.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are are examples of how to do this dynamically on here if you search.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have the list of variables which you did from your code above you can use that instead in the array.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 21:58:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363246#M85968</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-05-31T21:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: Back-fill empty rows with zero values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363248#M85970</link>
      <description>&lt;P&gt;Hi, another idea ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;data a;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;input ticker :$4. date :yymmn. returns @@;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;format date yymmn6.; &lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;datalines;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;Appl 200209 0.2 Appl 200210 0.1 Appl 200211 0.21 Appl 200212 0.22&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;BAC 200209 0.1 BAC 200210 . BAC 200212 0.23 C 200209 0.22&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;C 200210 0.11&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;proc sort data=a;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;by date ticker;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;proc transpose data=a out=b (drop=_name_);&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;by date;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;id ticker;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;var returns;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;proc stdize data=b out=b reponly missing=0;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;DATA SET: b&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;date &amp;nbsp; &amp;nbsp;Appl &amp;nbsp; &amp;nbsp;BAC &amp;nbsp; &amp;nbsp;C&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;200209 &amp;nbsp;0.20 &amp;nbsp; 0.10 &amp;nbsp; 0.22&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;200210 &amp;nbsp;0.10 &amp;nbsp; 0.00 &amp;nbsp; 0.11&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;200211 &amp;nbsp;0.21 &amp;nbsp; 0.00 &amp;nbsp; 0.00&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;200212 &amp;nbsp;0.22 &amp;nbsp; 0.23 &amp;nbsp; 0.00&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 22:09:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363248#M85970</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2017-05-31T22:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: Back-fill empty rows with zero values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363250#M85972</link>
      <description>Could always use the following instead of the IF/THEN route ...&lt;BR /&gt;&lt;BR /&gt;_ticker(i) = sum (_ticker(i), 0);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 31 May 2017 22:13:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363250#M85972</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2017-05-31T22:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: Back-fill empty rows with zero values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363260#M85982</link>
      <description>your answer is neat. But I have this warning messages. &lt;BR /&gt;&lt;BR /&gt;NOTE: No VAR statement is given. All numerical variables not named elsewhere &lt;BR /&gt;      make up the first set of variables.&lt;BR /&gt;WARNING: At least one of the scale and location estimators of variable XXX&lt;BR /&gt;         can not be computed. Variable XXX will not be standardized.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 31 May 2017 22:50:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363260#M85982</guid>
      <dc:creator>CheerfulChu</dc:creator>
      <dc:date>2017-05-31T22:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Back-fill empty rows with zero values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363266#M85985</link>
      <description>&lt;P&gt;Hi, works just fine even with warnings. If you want to get rid of them ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;proc stdize data=b out=b reponly missing=0;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;var appl bac c;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 23:07:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363266#M85985</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2017-05-31T23:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Back-fill empty rows with zero values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363269#M85987</link>
      <description>it works but warning still exist. I modified one of the solution above. Thanks</description>
      <pubDate>Wed, 31 May 2017 23:26:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363269#M85987</guid>
      <dc:creator>CheerfulChu</dc:creator>
      <dc:date>2017-05-31T23:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Back-fill empty rows with zero values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363271#M85989</link>
      <description>thanks</description>
      <pubDate>Wed, 31 May 2017 23:27:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363271#M85989</guid>
      <dc:creator>CheerfulChu</dc:creator>
      <dc:date>2017-05-31T23:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Back-fill empty rows with zero values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363274#M85991</link>
      <description>&lt;P&gt;Hi. I get no warnings if I specify a variable list in a VAR statement. You can also use ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;proc stdize data=b out=b reponly missing=0;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;var _numeric_;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;LOG ...&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;46&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;47 proc stdize data=b out=b reponly missing=0;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;48 var _numeric_;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;49 run;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;NOTE: There were 4 observations read from the data set WORK.B.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;NOTE: The data set WORK.B has 4 observations and 4 variables.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;NOTE: PROCEDURE STDIZE used (Total process time):&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt; real time 0.00 seconds&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt; cpu time 0.00 seconds&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just curious, could you post what you use in PROC STDIZE and the LOG&amp;nbsp;with the WARNINGS. &amp;nbsp;You should be able to use it and use a lot less code than a data step with an array. and loop if all you want is to replace missing numerics with zeroes. Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 00:02:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363274#M85991</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2017-06-01T00:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Back-fill empty rows with zero values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363458#M86078</link>
      <description>&lt;P&gt;I agreed with you that your solution is very neat but I keep having the warning messages. My system will ping me for warning messages. Hence I cant have warning messages although they are harmless.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;139? proc stdize data=B out=B reponly missing=0;&lt;BR /&gt;140? var _numeric_;&lt;BR /&gt;141? run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WARNING: At least one of the scale and location estimators of variable F&amp;nbsp;&lt;BR /&gt; can not be computed. Variable F will not be standardized.&lt;BR /&gt;WARNING: At least one of the scale and location estimators of variable T&amp;nbsp;&lt;BR /&gt; can not be computed. Variable T will not be standardized.&lt;BR /&gt;WARNING: At least one of the scale and location estimators of variable U&amp;nbsp;&lt;BR /&gt; can not be computed. Variable U will not be standardized.&lt;BR /&gt;NOTE: There were 4 observations read from the data set WORK.B.&lt;BR /&gt;NOTE: The data set WORK.B has 4 observations and 14 variables.&lt;BR /&gt;NOTE: PROCEDURE STDIZE used (Total process time):&lt;BR /&gt; real time 8.89 seconds&lt;BR /&gt; cpu time 0.01 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I re-run the above code, I will not have the messages but always appear on the first run. I not sure why.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 14:39:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Back-fill-empty-rows-with-zero-values/m-p/363458#M86078</guid>
      <dc:creator>CheerfulChu</dc:creator>
      <dc:date>2017-06-01T14:39:33Z</dc:date>
    </item>
  </channel>
</rss>

