<?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: Variable is uninitialized after using PROC EXPAND in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Variable-is-uninitialized-after-using-PROC-EXPAND/m-p/725065#M225165</link>
    <description>&lt;P&gt;As always, read the&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=etsug&amp;amp;docsetTarget=etsug_expand_syntax02.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to use the OUT= option to set the name of the output dataset.&lt;/P&gt;</description>
    <pubDate>Wed, 10 Mar 2021 07:16:08 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-03-10T07:16:08Z</dc:date>
    <item>
      <title>Variable is uninitialized after using PROC EXPAND</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-is-uninitialized-after-using-PROC-EXPAND/m-p/725058#M225160</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Today, after using proc expand to generate a variable, afterwards, I receive the note that the created variable is&amp;nbsp;uninitialized.&lt;/P&gt;
&lt;P&gt;The code is&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc expand data=agg_amihud_ew method=none;
	convert _FREQ_=lag_freq / transformout= (lag 1);
run;

data agg_amihud_ew_f;
set agg_amihud_ew;
 agg_amh_ew_final=agg_amh_ew_country*_FREQ_/lag_freq;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The note is&lt;/P&gt;
&lt;PRE&gt;28         proc expand data=agg_amihud_ew method=none;
29         	convert _FREQ_=lag_freq / transformout= (lag 1);
30         run;

NOTE: The data set WORK.DATA18 has 127 observations and 7 variables.
NOTE: PROCEDURE EXPAND used (Total process time):
      real time           0.02 seconds
      cpu time            0.01 seconds
      

31         
32         data agg_amihud_ew_f;
33         set agg_amihud_ew;
34          agg_amh_ew_final=agg_amh_ew_country*_FREQ_/lag_freq;
35         run;

NOTE: Variable lag_freq is uninitialized.
NOTE: Missing values were generated as a result of performing an operation on missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      7 at 34:37     120 at 34:44   &lt;/PRE&gt;
&lt;P&gt;When I read the log, I see it is because the proc expand creates a new dataset (DATA18) having different name with the original one(agg_amihud_ew), Could you please help me to sort it out (force PROC EXPAND create the new dataset replace the original one with the same name)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm regards.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 05:50:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-is-uninitialized-after-using-PROC-EXPAND/m-p/725058#M225160</guid>
      <dc:creator>Phil_NZ</dc:creator>
      <dc:date>2021-03-10T05:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Variable is uninitialized after using PROC EXPAND</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-is-uninitialized-after-using-PROC-EXPAND/m-p/725065#M225165</link>
      <description>&lt;P&gt;As always, read the&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=etsug&amp;amp;docsetTarget=etsug_expand_syntax02.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to use the OUT= option to set the name of the output dataset.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 07:16:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-is-uninitialized-after-using-PROC-EXPAND/m-p/725065#M225165</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-03-10T07:16:08Z</dc:date>
    </item>
  </channel>
</rss>

