<?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: Issue with feeding file name into another file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-feeding-file-name-into-another-file/m-p/245991#M268571</link>
    <description>&lt;P&gt;It works correctly as it call the program and run but it causes another issue that I countered when playing around with the original code.&lt;/P&gt;
&lt;P&gt;Some how it create the below warning and suprisingly, there is no&amp;nbsp;&lt;SPAN&gt;BUY_TYPE_RR10 variable in my list&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;the name of variables are&amp;nbsp;BUY_TYPE_RR10_sl123, &amp;nbsp;&amp;nbsp;BUY_TYPE_RR10_sl234&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I suspect that the Truncation cause this problem.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If I run the code manually, there is no warning at all.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This warning appear when I do the PROC MEANS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WARNING: Truncated record.&lt;BR /&gt;ERROR: Variable BUY_TYPE_RR10 not found.&lt;/P&gt;
&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;</description>
    <pubDate>Mon, 25 Jan 2016 21:20:05 GMT</pubDate>
    <dc:creator>hhchenfx</dc:creator>
    <dc:date>2016-01-25T21:20:05Z</dc:date>
    <item>
      <title>Issue with feeding file name into another file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-feeding-file-name-into-another-file/m-p/245978#M268568</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have 2 SAS code. Code 1 is to process data. At the end of Code 1.&amp;nbsp;I get the final/clean data named &lt;SPAN&gt;CLEAN_DATA&lt;/SPAN&gt;.&lt;/P&gt;
&lt;P&gt;For analysis purpose (say Proc means...), I put them all in Code 2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will make my code easy to follow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At the end of code 1, I call "code 2.sas" using the few line below;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;----------------------------------------------------------------------------------------------------------------&lt;BR /&gt;filename w3 temp;&lt;BR /&gt;data _null_;&lt;BR /&gt;file w3;&lt;BR /&gt; put '%let ' &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;datafile&lt;/FONT&gt;&lt;/STRONG&gt;="CLEAN_DATA" ';' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *when I use&amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;datafile&lt;/FONT&gt;&lt;/STRONG&gt;&lt;SPAN&gt;=CLEAN_DATA without quote, still not work;&lt;/SPAN&gt;&lt;BR /&gt; / '%include "C:\Users\HPNEW\Dropbox\SAS\CODE 2.sas" ;'&lt;BR /&gt; ;&lt;BR /&gt;run;&lt;BR /&gt;%include w3 / source2 ;&lt;BR /&gt;&lt;SPAN&gt;----------------------------------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code 2 is&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sort data=&amp;amp;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;datafile&lt;/FONT&gt;&lt;/STRONG&gt;;by date;run;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;proc means data=&amp;amp;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;datafile&lt;/FONT&gt; &lt;/STRONG&gt;noprint;&lt;BR /&gt; by date ;&lt;BR /&gt; var var1 var2.....&lt;/P&gt;
&lt;P&gt;---------------------------------------------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It doesnt works.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you help me to fix it or suggest a method that works?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HHC&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The error notice is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Line generated by the macro variable "DATAFILE".&lt;BR /&gt;1 . &lt;SPAN&gt;CLEAN_DATA&lt;/SPAN&gt;&lt;BR /&gt; -&lt;BR /&gt; 22&lt;BR /&gt; 200&lt;/P&gt;
&lt;P&gt;ERROR 22-322: Expecting a name.&lt;/P&gt;
&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;**************************************************************SOLUTION*****************************************&lt;/P&gt;
&lt;P&gt;%let datafile1=Buy_signal;&lt;BR /&gt;%let datafile2=Sell_signal;&lt;/P&gt;
&lt;P&gt;%include "C:\Users\HPNEW\Dropbox\SAS\return_report_1.sas" /&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;lrecl=500&lt;/FONT&gt;&lt;/STRONG&gt;;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2016 21:28:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-feeding-file-name-into-another-file/m-p/245978#M268568</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2016-01-25T21:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with feeding file name into another file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-feeding-file-name-into-another-file/m-p/245985#M268569</link>
      <description>&lt;P&gt;It looks like you could simplify the program considerably.&amp;nbsp; Try it this way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let datafile=CLEAN_DATA;&lt;/P&gt;
&lt;P&gt;%include "C:\Users\HPNEW\Dropbox\SAS\CODE 2.sas" ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The rest wouldn't be needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2016 21:02:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-feeding-file-name-into-another-file/m-p/245985#M268569</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-01-25T21:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with feeding file name into another file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-feeding-file-name-into-another-file/m-p/245987#M268570</link>
      <description>&lt;P&gt;Have you tried it without the %put?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let datafile=CLEAN_DATA; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Jan 2016 21:04:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-feeding-file-name-into-another-file/m-p/245987#M268570</guid>
      <dc:creator>DanZ</dc:creator>
      <dc:date>2016-01-25T21:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with feeding file name into another file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-feeding-file-name-into-another-file/m-p/245991#M268571</link>
      <description>&lt;P&gt;It works correctly as it call the program and run but it causes another issue that I countered when playing around with the original code.&lt;/P&gt;
&lt;P&gt;Some how it create the below warning and suprisingly, there is no&amp;nbsp;&lt;SPAN&gt;BUY_TYPE_RR10 variable in my list&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;the name of variables are&amp;nbsp;BUY_TYPE_RR10_sl123, &amp;nbsp;&amp;nbsp;BUY_TYPE_RR10_sl234&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I suspect that the Truncation cause this problem.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If I run the code manually, there is no warning at all.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This warning appear when I do the PROC MEANS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WARNING: Truncated record.&lt;BR /&gt;ERROR: Variable BUY_TYPE_RR10 not found.&lt;/P&gt;
&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2016 21:20:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-feeding-file-name-into-another-file/m-p/245991#M268571</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2016-01-25T21:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with feeding file name into another file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-feeding-file-name-into-another-file/m-p/245993#M268572</link>
      <description>&lt;P&gt;Check the length of the line of code in your programs.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try adding the LRECL= option to the end of your include statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%include 'filename.sas' /lrecl=500;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2016 21:21:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-feeding-file-name-into-another-file/m-p/245993#M268572</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-01-25T21:21:37Z</dc:date>
    </item>
  </channel>
</rss>

