<?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 PROC ds2 output variable not creaed in the dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-ds2-output-variable-not-creaed-in-the-dataset/m-p/315618#M68880</link>
    <description>&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;If i use this code to create a data set, the day_tran variable is not created.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;But if comment out declaration, then the variable is created but with a log message "&lt;/FONT&gt;WARNING: Line 570: No DECLARE for assigned-to variable day_tran; assuming type double."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is that normal or is there way to counter this message?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;method&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="4"&gt;run&lt;/FONT&gt;&lt;FONT face="Courier New" size="4"&gt;();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;declare&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="4"&gt;&lt;FONT face="Courier New" size="4"&gt; double day_tran;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;set&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="4"&gt;&lt;FONT face="Courier New" size="4"&gt; dsets.ersplita;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;day_tran=date2days(to_double(startdt),to_double(startdt));&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;end&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="4"&gt;&lt;FONT face="Courier New" size="4"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Nov 2016 17:46:56 GMT</pubDate>
    <dc:creator>jins</dc:creator>
    <dc:date>2016-11-30T17:46:56Z</dc:date>
    <item>
      <title>PROC ds2 output variable not creaed in the dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-ds2-output-variable-not-creaed-in-the-dataset/m-p/315618#M68880</link>
      <description>&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;If i use this code to create a data set, the day_tran variable is not created.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;But if comment out declaration, then the variable is created but with a log message "&lt;/FONT&gt;WARNING: Line 570: No DECLARE for assigned-to variable day_tran; assuming type double."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is that normal or is there way to counter this message?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;method&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="4"&gt;run&lt;/FONT&gt;&lt;FONT face="Courier New" size="4"&gt;();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;declare&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="4"&gt;&lt;FONT face="Courier New" size="4"&gt; double day_tran;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;set&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="4"&gt;&lt;FONT face="Courier New" size="4"&gt; dsets.ersplita;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;day_tran=date2days(to_double(startdt),to_double(startdt));&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;end&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="4"&gt;&lt;FONT face="Courier New" size="4"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2016 17:46:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-ds2-output-variable-not-creaed-in-the-dataset/m-p/315618#M68880</guid>
      <dc:creator>jins</dc:creator>
      <dc:date>2016-11-30T17:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: PROC ds2 output variable not creaed in the dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-ds2-output-variable-not-creaed-in-the-dataset/m-p/315673#M68893</link>
      <description>&lt;P&gt;If you want it output to the dataset, you have to declare it&amp;nbsp;outside of&amp;nbsp;a method. &amp;nbsp;For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class;
  set sashelp.class;
run;
proc ds2;
data wantds2;
dcl double day_tran;
method run();

set class;
day_tran=intnx('year',0, age);
end;
run;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Nov 2016 20:25:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-ds2-output-variable-not-creaed-in-the-dataset/m-p/315673#M68893</guid>
      <dc:creator>snoopy369</dc:creator>
      <dc:date>2016-11-30T20:25:54Z</dc:date>
    </item>
  </channel>
</rss>

