<?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: SAS programming 1 lesson 7 help in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-programming-1-lesson-7-help/m-p/492819#M129589</link>
    <description>&lt;P&gt;You will want to watch concatenation of strings in the macro language.&lt;/P&gt;
&lt;P&gt;Instead of&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="SAS Monospace" size="2"&gt;path&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;=&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;"&amp;amp;path/custfm.xls"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000" face="SAS Monospace" size="2"&gt;better would be.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="SAS Monospace" size="2"&gt;path&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;=&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;"&amp;amp;path&lt;FONT color="#ff0000"&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;/custfm.xls"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="SAS Monospace" size="2"&gt;The period indicates the end of the macro variable. Often if you do not use it with other text you will get a "macro variable not found" because the macro processor will think you had a different variable in mind. Suppose that your &amp;amp;path variable included the / as the last character. You might have referenced:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="SAS Monospace" size="2"&gt;path="&amp;amp;pathcustfm.xls" thinking that the / resolves. But the macro processor would be looking for a macro variable name pathcustfm.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Sep 2018 20:59:08 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-09-05T20:59:08Z</dc:date>
    <item>
      <title>SAS programming 1 lesson 7 help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-programming-1-lesson-7-help/m-p/492806#M129580</link>
      <description>&lt;P&gt;Taking SAS programming 1(in middle of lesson 7) using SAS university edition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the practice problem I am working on, this code should work (I haven't included my full path for privacy reasons).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;__________&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname custfm pcfiles path="&amp;amp;path/custfm.xls";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc contents data=custfm._all_;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data work.males;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc print data=work.males label;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname custfm clear;&lt;/P&gt;&lt;P&gt;____________&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Problem 1) The path that should contain custfm.xls ends in the folder ecprg193, which doesn't contain that file with the info to complete the practice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem 2) SAS university edition doesn't have pcfiles engine to assign a libref to an excel file, and the directions are unclear what engine I should use. I am using an imac if that is helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 20:31:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-programming-1-lesson-7-help/m-p/492806#M129580</guid>
      <dc:creator>aaronbailey79</dc:creator>
      <dc:date>2018-09-05T20:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAS programming 1 lesson 7 help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-programming-1-lesson-7-help/m-p/492808#M129581</link>
      <description>&lt;P&gt;Regarding #2 try either Excel or XLSX instead of PCFILES. The format is slightly different:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname custfm excel 'path to excel file';

libname custfm xlsx 'path to excel file';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Your paths should pretty much be '/folders/myfolders/ecprgm/...' so not sure what that needs to be masked in SAS UE.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using a Mac or PC doesn't affect any of the code or options you need to use here.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Revisit the setup instructions and see if the set up instructions reference custfm or if there are any errors when it runs that reference it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 20:36:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-programming-1-lesson-7-help/m-p/492808#M129581</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-05T20:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAS programming 1 lesson 7 help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-programming-1-lesson-7-help/m-p/492811#M129584</link>
      <description>Regarding the 1st one, I think there should be a folder like excel files or something like that. Check for it</description>
      <pubDate>Wed, 05 Sep 2018 20:39:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-programming-1-lesson-7-help/m-p/492811#M129584</guid>
      <dc:creator>SASNardo92</dc:creator>
      <dc:date>2018-09-05T20:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAS programming 1 lesson 7 help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-programming-1-lesson-7-help/m-p/492812#M129585</link>
      <description>Actually if memory serves correctly, you're only supposed to watch that section, it says it somewhere in there that you can't run it with SAS UE. You may be able to find that reference somewhere on here. I believe it was via Cynthia from SAS.</description>
      <pubDate>Wed, 05 Sep 2018 20:40:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-programming-1-lesson-7-help/m-p/492812#M129585</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-05T20:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAS programming 1 lesson 7 help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-programming-1-lesson-7-help/m-p/492813#M129586</link>
      <description>&lt;P&gt;Okay, thank you! I will stop tearing my hair out.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 20:41:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-programming-1-lesson-7-help/m-p/492813#M129586</guid>
      <dc:creator>aaronbailey79</dc:creator>
      <dc:date>2018-09-05T20:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAS programming 1 lesson 7 help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-programming-1-lesson-7-help/m-p/492817#M129588</link>
      <description>&lt;P&gt;I would still make sure you know how to access/import an Excel file, but you can follow the tutorials on video.sas.com &amp;gt; How To Tutorials&amp;gt;Analytics U&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good Luck!&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 20:53:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-programming-1-lesson-7-help/m-p/492817#M129588</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-05T20:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: SAS programming 1 lesson 7 help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-programming-1-lesson-7-help/m-p/492819#M129589</link>
      <description>&lt;P&gt;You will want to watch concatenation of strings in the macro language.&lt;/P&gt;
&lt;P&gt;Instead of&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="SAS Monospace" size="2"&gt;path&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;=&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;"&amp;amp;path/custfm.xls"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000" face="SAS Monospace" size="2"&gt;better would be.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="SAS Monospace" size="2"&gt;path&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;=&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;"&amp;amp;path&lt;FONT color="#ff0000"&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;/custfm.xls"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="SAS Monospace" size="2"&gt;The period indicates the end of the macro variable. Often if you do not use it with other text you will get a "macro variable not found" because the macro processor will think you had a different variable in mind. Suppose that your &amp;amp;path variable included the / as the last character. You might have referenced:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="SAS Monospace" size="2"&gt;path="&amp;amp;pathcustfm.xls" thinking that the / resolves. But the macro processor would be looking for a macro variable name pathcustfm.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 20:59:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-programming-1-lesson-7-help/m-p/492819#M129589</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-09-05T20:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAS programming 1 lesson 7 help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-programming-1-lesson-7-help/m-p/492820#M129590</link>
      <description>&lt;P&gt;SAS treats the characters '\' &amp;amp; '/' as delimiters for macro variables as well and it resolves correctly without the&amp;nbsp; period.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%let path_folder = C:\_localdata\;

libname test "&amp;amp;path_folder\temp";&lt;/PRE&gt;
&lt;P&gt;The log will show both work the same:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;129  %let path_folder = C:\_localdata\;
130
131  libname test "&amp;amp;path_folder/temp";
NOTE: Libref TEST was successfully assigned as follows:
      Engine:        V9
      Physical Name: C:\_localdata\\temp

132  %let path_folder = C:\_localdata\;
133
134  libname test "&amp;amp;path_folder\temp";
NOTE: Libref TEST was successfully assigned as follows:
      Engine:        V9
      Physical Name: C:\_localdata\\temp

135  libname test "&amp;amp;path_folder.\temp";
NOTE: Libref TEST was successfully assigned as follows:
      Engine:        V9
      Physical Name: C:\_localdata\\temp
&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Sep 2018 21:05:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-programming-1-lesson-7-help/m-p/492820#M129590</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-05T21:05:21Z</dc:date>
    </item>
  </channel>
</rss>

