<?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: Proc export TXT format assistance in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-export-TXT-format-assistance/m-p/507344#M136154</link>
    <description>&lt;P&gt;You can add S to the format to tell SAS to use slashes instead of hyphens as the delimiter.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;YYMMDDS10.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I still wouldn't use either MMDDYY or DDMMYY. Either way your date strings will confuse half of your American/British friends.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Oct 2018 22:17:40 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2018-10-24T22:17:40Z</dc:date>
    <item>
      <title>Proc export TXT format assistance</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-export-TXT-format-assistance/m-p/507300#M136143</link>
      <description>&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; test1;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Group $ Date1 &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;date9.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;datalines&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;AARP 1JUN2013&lt;/P&gt;
&lt;P&gt;BBPP 12AUG2016&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; test2;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; test1;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; date1 &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;date9.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;　&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;export&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; = test2&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;OUTFILE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;= "&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;dorsshare.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;\GS\&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;citiday.&lt;STRONG&gt;.t&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;xt"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;dbms&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=DLM&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;replace&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;delimiter&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;='|';&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;When the end user receives the file and imports it, for some reason the date1 imports as a text.&amp;nbsp; The exact thing happened when I imported in MS Access.&amp;nbsp; The date defaults to text even though it was defined as a date in the datastep.&amp;nbsp; Do I need to change date1 to a numeric or date at proc export runtime???&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2018 19:42:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-export-TXT-format-assistance/m-p/507300#M136143</guid>
      <dc:creator>Q1983</dc:creator>
      <dc:date>2018-10-24T19:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: Proc export TXT format assistance</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-export-TXT-format-assistance/m-p/507302#M136145</link>
      <description>&lt;P&gt;A text file has no way to tell the user what format each variable contains. Everything is text and how to interpret the text is left to the consumer of the text file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ask them what format their system expects to see DATE values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could try using YYMMDD10. as the format instead of DATE9.&amp;nbsp; Then the text in the file will look like 2016-08-12 instead of 12AUG2016 and perhaps their software will recognize those as dates.&amp;nbsp; I would avoid MMDDYY or DDMMYY format to avoid having August 12th confused for December 8th.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some systems do not have a concept of DATE value. Only DATETIME (or timestamp).&amp;nbsp; You might need to add a time part to your dates to get them to automatically recognize them as representing a datetime value.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2018 20:01:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-export-TXT-format-assistance/m-p/507302#M136145</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-10-24T20:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Proc export TXT format assistance</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-export-TXT-format-assistance/m-p/507304#M136147</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, it will be imported as a text value, as the export file contains text values e.g. 01JUN2013 &amp;amp; 12AUG2016&lt;BR /&gt;&lt;BR /&gt;You have several options to solve this, and it depends what your needs are&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) You could use PROC CPORT &amp;amp; CIMPORT to transfer the SAS dataset&lt;/P&gt;
&lt;P&gt;2) You could drop the format, then the export&amp;nbsp;text file will contain a numeric e.g. 19150 &amp;amp; 20678. Then apply a format to that variable after the other user reads&amp;nbsp;in the text file&lt;/P&gt;
&lt;P&gt;3) You could leave it as is, then use the&amp;nbsp;INPUTN function to convert the character date to a numeric&lt;BR /&gt;&lt;BR /&gt;Andy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2018 19:56:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-export-TXT-format-assistance/m-p/507304#M136147</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2018-10-24T19:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Proc export TXT format assistance</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-export-TXT-format-assistance/m-p/507305#M136148</link>
      <description>My examples are for moving a SAS dataset between SAS environments, I didn't consider the solutions Tom mentions which move the dataset from SAS to some other application/database.&lt;BR /&gt;Just goes to show that it depends on what you are trying to achieve</description>
      <pubDate>Wed, 24 Oct 2018 19:59:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-export-TXT-format-assistance/m-p/507305#M136148</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2018-10-24T19:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Proc export TXT format assistance</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-export-TXT-format-assistance/m-p/507340#M136151</link>
      <description>&lt;P&gt;You need to provide the format in a way how the consumer accepts. In your case if your exported file is later imported in Access then you need to format values in such a way that Access understands. Try format mmddyy10. instead and also while importing in Access you need to tell the format to it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See the screenshot for Access:&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="image.png" style="width: 461px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24381iDC2FBA198B31A14B/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2018 21:06:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-export-TXT-format-assistance/m-p/507340#M136151</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-10-24T21:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Proc export TXT format assistance</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-export-TXT-format-assistance/m-p/507344#M136154</link>
      <description>&lt;P&gt;You can add S to the format to tell SAS to use slashes instead of hyphens as the delimiter.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;YYMMDDS10.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I still wouldn't use either MMDDYY or DDMMYY. Either way your date strings will confuse half of your American/British friends.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2018 22:17:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-export-TXT-format-assistance/m-p/507344#M136154</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-10-24T22:17:40Z</dc:date>
    </item>
  </channel>
</rss>

