<?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: Specifying file path in data step in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Specifying-file-path-in-data-step/m-p/419218#M103057</link>
    <description>&lt;P&gt;Look for something like the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname msa&amp;amp;f 'path to folder here';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That sets the path to the msa folder and is what you need to change.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Dec 2017 15:52:13 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-12-07T15:52:13Z</dc:date>
    <item>
      <title>Specifying file path in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Specifying-file-path-in-data-step/m-p/418913#M102952</link>
      <description>&lt;P&gt;Just gained ownership over some sas code that is not working at current:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data step has a merge statement that references a "master.sas7bdat" data set the following way:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;merge msa$f..master(in = b);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where $f = module&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the location of the file is ~msa/module/data and it returns with an error that there is no libname defined&amp;nbsp;as msamodule.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Long story short-I am lost on how to properly specify the path, (and I don't know why the code suddenly broke when I gained ownership over this issue either).&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 18:42:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Specifying-file-path-in-data-step/m-p/418913#M102952</guid>
      <dc:creator>abak</dc:creator>
      <dc:date>2017-12-06T18:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying file path in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Specifying-file-path-in-data-step/m-p/418915#M102953</link>
      <description>&lt;P&gt;Can you post the exact code, that doesn't look correct.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 18:54:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Specifying-file-path-in-data-step/m-p/418915#M102953</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-06T18:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying file path in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Specifying-file-path-in-data-step/m-p/418943#M102961</link>
      <description>&lt;P&gt;Are you sure the character $ in this code is what is actually in the code file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;merge msa$f..master(in = b);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would more likely expect to see&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;merge msa&amp;amp;f..master(in = b);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which would expect the presence of a macro variable named F whose value is used to reference an existing library whose name starts with the letters MSA among a number of libraries. A further clue is the two periods in the statement as that is proper for used of a macro variable followed by an element that should contain a period such as the separator between a library name and the data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suppose I had SAS libraries named:&lt;/P&gt;
&lt;P&gt;msanew&lt;/P&gt;
&lt;P&gt;msaold&lt;/P&gt;
&lt;P&gt;msatest.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I execute&lt;/P&gt;
&lt;P&gt;%let f = new; assigning a value to a macro variable named f, then&lt;/P&gt;
&lt;P&gt;msa&amp;amp;f&amp;nbsp; would resolve to msanew when used only as a library reference and&lt;/P&gt;
&lt;P&gt;msa&amp;amp;f..master would resolve to msanew.master where a data set name was needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 20:39:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Specifying-file-path-in-data-step/m-p/418943#M102961</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-12-06T20:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying file path in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Specifying-file-path-in-data-step/m-p/418993#M102976</link>
      <description>&lt;P&gt;You are both right. The code uses a &amp;amp; not a $.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Exact Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;call symput("f","module");&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data cleanmaster2;&lt;BR /&gt;merge msa&amp;amp;f..master(in=b)&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 23:28:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Specifying-file-path-in-data-step/m-p/418993#M102976</guid>
      <dc:creator>abak</dc:creator>
      <dc:date>2017-12-06T23:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying file path in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Specifying-file-path-in-data-step/m-p/419194#M103040</link>
      <description>&lt;P&gt;Yes, as stated above for the other contributor: THe code is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;call symput("f","module");&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data cleanmaster2;&lt;BR /&gt;merge msa&amp;amp;f..master(in=b)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;....etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I still don't know how to specify the path msa/module/data.master.sas&amp;nbsp;(master is the name of the sas&amp;nbsp;data set I need to pull in)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 14:55:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Specifying-file-path-in-data-step/m-p/419194#M103040</guid>
      <dc:creator>abak</dc:creator>
      <dc:date>2017-12-07T14:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying file path in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Specifying-file-path-in-data-step/m-p/419218#M103057</link>
      <description>&lt;P&gt;Look for something like the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname msa&amp;amp;f 'path to folder here';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That sets the path to the msa folder and is what you need to change.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 15:52:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Specifying-file-path-in-data-step/m-p/419218#M103057</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-07T15:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying file path in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Specifying-file-path-in-data-step/m-p/419254#M103067</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/156653"&gt;@abak&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;call symput("f","module");&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data cleanmaster2;&lt;BR /&gt;merge msa&amp;amp;f..master(in=b)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;....etc&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;this code, and a Libname statement using msa&amp;amp;f will generate errors. Library names are limited to 8 characters.&lt;/P&gt;
&lt;P&gt;msamodule would be 9 characters and hence invalid.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 17:24:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Specifying-file-path-in-data-step/m-p/419254#M103067</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-12-07T17:24:23Z</dc:date>
    </item>
  </channel>
</rss>

