<?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: Creating text file without the &amp;quot;.txt&amp;quot; extension in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-text-file-without-the-quot-txt-quot-extension/m-p/898570#M355167</link>
    <description>&lt;P&gt;Apologies for the confusion - I was "cleaning" up my code to make it more generic for public sharing and forgot to edit the fileref in both places. I am using the same fileref in both places in my actual code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps it doesn't matter how windows is trying to associate the file "type", but below is a screen shot from my windows explorer, bottom file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PRODFILE.jpg" style="width: 364px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88854i910A807725DA52C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="PRODFILE.jpg" alt="PRODFILE.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 14 Oct 2023 00:15:09 GMT</pubDate>
    <dc:creator>DerekD_WF</dc:creator>
    <dc:date>2023-10-14T00:15:09Z</dc:date>
    <item>
      <title>Creating text file without the ".txt" extension</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-text-file-without-the-quot-txt-quot-extension/m-p/898562#M355164</link>
      <description>&lt;P&gt;How do I go about creating a text file that does not have the ".txt" extension in the filename? If I remove from the ".txt" from the fileref below, it creates the file as a "PART3 File" for the filetype.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, the naming convention is stupid, but it's in the requirements for how the ingesting system needs the file to be.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nobomfile ;

filename out '/dir/FILEPART1.PART2.PART3.txt' encoding="utf-8" termstr=crlf ;

proc export data=work.my_data
	outfile=qtlout
	dbms=dlm
	replace;
	delimiter="|";
	putnames=NO;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 Oct 2023 22:40:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-text-file-without-the-quot-txt-quot-extension/m-p/898562#M355164</guid>
      <dc:creator>DerekD_WF</dc:creator>
      <dc:date>2023-10-13T22:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating text file without the ".txt" extension</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-text-file-without-the-quot-txt-quot-extension/m-p/898568#M355166</link>
      <description>&lt;P&gt;In your code you define fileref "out" but then use a fileref "qlout" in Proc Export. Not sure if that's the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To my knowledge the file extension is just part of the name of the file without any functional relevance to the code Proc Export creates.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't replicate what you describe and things work for me as expected.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nobomfile ;

filename outfile 'c:\temp\FILEPART1.PART2.PART3.dummy' encoding="utf-8" termstr=crlf ;

proc export 
  data=sashelp.class
	outfile=outfile
	dbms=dlm
	replace;
	delimiter="|";
	putnames=NO;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1697242070615.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88853i8B29573C9F8A3727/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Patrick_0-1697242070615.png" alt="Patrick_0-1697242070615.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2023 00:08:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-text-file-without-the-quot-txt-quot-extension/m-p/898568#M355166</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-10-14T00:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Creating text file without the ".txt" extension</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-text-file-without-the-quot-txt-quot-extension/m-p/898570#M355167</link>
      <description>&lt;P&gt;Apologies for the confusion - I was "cleaning" up my code to make it more generic for public sharing and forgot to edit the fileref in both places. I am using the same fileref in both places in my actual code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps it doesn't matter how windows is trying to associate the file "type", but below is a screen shot from my windows explorer, bottom file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PRODFILE.jpg" style="width: 364px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88854i910A807725DA52C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="PRODFILE.jpg" alt="PRODFILE.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2023 00:15:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-text-file-without-the-quot-txt-quot-extension/m-p/898570#M355167</guid>
      <dc:creator>DerekD_WF</dc:creator>
      <dc:date>2023-10-14T00:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating text file without the ".txt" extension</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-text-file-without-the-quot-txt-quot-extension/m-p/898572#M355169</link>
      <description>&lt;P&gt;I'm not sure what you're trying to tell me here but bottom-line is: SAS will export to a file with a name exactly as you define it in your filename statement.&lt;/P&gt;
&lt;P&gt;If that's really not the case for you then please share the actual code AND the full SAS log.&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2023 01:01:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-text-file-without-the-quot-txt-quot-extension/m-p/898572#M355169</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-10-14T01:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: Creating text file without the ".txt" extension</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-text-file-without-the-quot-txt-quot-extension/m-p/898587#M355178</link>
      <description>&lt;P&gt;What the dumb Windows Explorer&amp;nbsp;&lt;EM&gt;thinks&lt;/EM&gt; about your file is irrelevant. The target software is relevant, as long as it can read the file, all is good.&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2023 05:51:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-text-file-without-the-quot-txt-quot-extension/m-p/898587#M355178</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-10-14T05:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Creating text file without the ".txt" extension</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-text-file-without-the-quot-txt-quot-extension/m-p/898597#M355183</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you have indicated the value in the Type column in Windows Explorer is based on the file extension - see below screen shot - and when there is no extension then "File" appears in the Type column, as per the screen shot. Perhaps you should clarify what you want or expect to see in the Type column and why.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the file is named according to the requirements you've been given, then perhaps you should ask the requestors to check if the file is suitable for their requirements and they can let you know if they need anything different.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Amir_1-1697281265625.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88860iB25B10F647DE7B31/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Amir_1-1697281265625.png" alt="Amir_1-1697281265625.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; kind regards,&lt;/P&gt;
&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2023 11:25:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-text-file-without-the-quot-txt-quot-extension/m-p/898597#M355183</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2023-10-14T11:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: Creating text file without the ".txt" extension</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-text-file-without-the-quot-txt-quot-extension/m-p/898606#M355188</link>
      <description>&lt;P&gt;What Windows thinks the file extension means does not really matter, other than it is easier when the file extension matches to content since then things like double clicking to open a file will work properly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't want Windows to treat PART3 as the file extension then either add some other extension or remove the other periods in the filename.&amp;nbsp; Perhaps you could replace the periods with underscores instead.&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2023 15:42:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-text-file-without-the-quot-txt-quot-extension/m-p/898606#M355188</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-10-14T15:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: Creating text file without the ".txt" extension</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-text-file-without-the-quot-txt-quot-extension/m-p/898608#M355190</link>
      <description>&lt;P&gt;I think the Windows definition of a file extension is "text in a file name after the last period (full stop)."&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So when you name a file:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;FILEPART1.PART2.PART3.txt&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The extension is txt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you name a file:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;FILEPART1.PART2.PART3&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;the extension is PART3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the extension is just a part of the file name on Windows.&amp;nbsp; It doesn't really matter.&amp;nbsp; If you have a period in a file name, there is no way to tell Windows that the text after the period is not an extension.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I find life becomes easier on Windows if you configure it to show extensions for all file names, not hide them, which is the default.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I agree with everyone else, you've already accomplished your goal.&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2023 16:07:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-text-file-without-the-quot-txt-quot-extension/m-p/898608#M355190</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-10-14T16:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: Creating text file without the ".txt" extension</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-text-file-without-the-quot-txt-quot-extension/m-p/898613#M355193</link>
      <description>Thanks - I can open the file in Notepad++ and my pipe-delimited contents look as expected so I think I can safely ignore what the file explorer is interpreting as the filetype.</description>
      <pubDate>Sat, 14 Oct 2023 16:48:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-text-file-without-the-quot-txt-quot-extension/m-p/898613#M355193</guid>
      <dc:creator>DerekD_WF</dc:creator>
      <dc:date>2023-10-14T16:48:52Z</dc:date>
    </item>
  </channel>
</rss>

