<?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: Naming an external file in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Naming-an-external-file/m-p/488239#M31565</link>
    <description>&lt;P&gt;Hello Kurt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I thought the name limitation applied to any SAS Code (program) that we would like to execute. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for the details. Now, it's clearer to me.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Aug 2018 15:23:21 GMT</pubDate>
    <dc:creator>alepage</dc:creator>
    <dc:date>2018-08-20T15:23:21Z</dc:date>
    <item>
      <title>Naming an external file</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Naming-an-external-file/m-p/488214#M31560</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My colleagues here use a standardized way to name external files. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Name of the provider of the file, '-', Name of the file. file extension. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ex: Hydro_One-Billing_Services.xml So Hydro_One is the source Billing_Services is the filename and .xml is the filename extension. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The complete (desired name) is Hydro_One-Billing_Services.xml &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried to explain to them that SAS do not take a hyphen but they want to keep their way of doing things. Can we rename the file programmatically according to their standard?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 14:34:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Naming-an-external-file/m-p/488214#M31560</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2018-08-20T14:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Naming an external file</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Naming-an-external-file/m-p/488218#M31561</link>
      <description>&lt;P&gt;I don't think SAS has any trouble using a hyphen in a filename, but it would depend on what operating system your SAS process is running on whether the operating system had any issue with a hyphen in the filename.&lt;/P&gt;
&lt;P&gt;In data step code you might do something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want ;
  set have;
  length filename $200 ;
  filename=cats(provider,'-',filetype,'.xml');
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In macro code you might do something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let provider=Hydro_One ;
%let filetype=Billing_Services;
%let filename=&amp;amp;provider.-&amp;amp;filetype..xml;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 14:43:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Naming-an-external-file/m-p/488218#M31561</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-08-20T14:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Naming an external file</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Naming-an-external-file/m-p/488223#M31562</link>
      <description>&lt;P&gt;SAS accepts the hyphen.&amp;nbsp; There is no problem?&amp;nbsp; It is recommended to not use special characters, spaces and such like in paths or filenames of course.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 14:46:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Naming-an-external-file/m-p/488223#M31562</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-08-20T14:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Naming an external file</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Naming-an-external-file/m-p/488224#M31563</link>
      <description>&lt;P&gt;A hyphen is only an issue with a SAS data set name and even then, if you need to get around it you can use the VALIDVARNAME option ANY to set it to take a hyphen. But then you have to refer to every variable using the name literal convention:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;'name-with hyphen and space'n&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/76331"&gt;@alepage&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I tried to explain to them that SAS do not take a hyphen but they want to keep their way of doing things. Can we rename the file programmatically according to their standard?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 14:49:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Naming-an-external-file/m-p/488224#M31563</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-08-20T14:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Naming an external file</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Naming-an-external-file/m-p/488225#M31564</link>
      <description>&lt;P&gt;Anything that is supported by the operating system can be used in a physical filename. Hyphens cause problems only where valid SAS names are needed (file references, libnames, datasets, variables).&lt;/P&gt;
&lt;P&gt;Keep in mind that physical filenames are just strings to SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Hydro_One-Billing_Services.xml &lt;/PRE&gt;
&lt;P&gt;is perfectly valid as a filename in UNIX and Windows.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But you'll get problems with a file named&lt;/P&gt;
&lt;PRE&gt;my try on a dumb &amp;amp; improper "filename'? .xml&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 14:50:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Naming-an-external-file/m-p/488225#M31564</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-20T14:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Naming an external file</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Naming-an-external-file/m-p/488239#M31565</link>
      <description>&lt;P&gt;Hello Kurt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I thought the name limitation applied to any SAS Code (program) that we would like to execute. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for the details. Now, it's clearer to me.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 15:23:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Naming-an-external-file/m-p/488239#M31565</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2018-08-20T15:23:21Z</dc:date>
    </item>
  </channel>
</rss>

