<?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: Trailing blanks for text file export in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Trailing-blanks-for-text-file-export/m-p/323339#M1750</link>
    <description>&lt;P&gt;Hi there&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It has to be a text file to meet requirements so I need to stick with that I have to date&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Aidan&lt;/P&gt;</description>
    <pubDate>Mon, 09 Jan 2017 12:41:14 GMT</pubDate>
    <dc:creator>Aidan</dc:creator>
    <dc:date>2017-01-09T12:41:14Z</dc:date>
    <item>
      <title>Trailing blanks for text file export</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Trailing-blanks-for-text-file-export/m-p/323313#M1746</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am generating an output file with a heading. There are numerous columns concateneated together below. After these I need to add blank spacing of 40 characters so the file will upload in a set format to external area.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas on how I can manipulate the current file as SAS seems to remove blanks on export.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create view work.W4NV5KA as&lt;BR /&gt;select RecordType||UndertakingID||ContactName||ContactPhone||Email||PUT(Date, yymmddn8.) as Heading&lt;BR /&gt;from &amp;amp;SYSLAST&lt;BR /&gt;;&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;PROC PRINT DATA=work.W4NV5KA;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;PROC EXPORT DATA=work.W4NV5KA&lt;BR /&gt;OUTFILE="C:\test.txt"&lt;BR /&gt;DBMS=TAB REPLACE;&lt;BR /&gt;PUTNAMES=NO; /* must be set to no to hide the column heading of the variable in the header section of the file.*/&lt;BR /&gt;RUN;&lt;BR /&gt;PROC PRINT;&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;Thanks,&lt;/P&gt;&lt;P&gt;Aidan&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 10:16:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Trailing-blanks-for-text-file-export/m-p/323313#M1746</guid>
      <dc:creator>Aidan</dc:creator>
      <dc:date>2017-01-09T10:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Trailing blanks for text file export</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Trailing-blanks-for-text-file-export/m-p/323319#M1747</link>
      <description>&lt;P&gt;Perhaps you could try to use FILENAME with RECFM=F.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 10:37:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Trailing-blanks-for-text-file-export/m-p/323319#M1747</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-01-09T10:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: Trailing blanks for text file export</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Trailing-blanks-for-text-file-export/m-p/323325#M1748</link>
      <description>&lt;P&gt;Would you have an example of how I could apply this to the current code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 11:21:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Trailing-blanks-for-text-file-export/m-p/323325#M1748</guid>
      <dc:creator>Aidan</dc:creator>
      <dc:date>2017-01-09T11:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Trailing blanks for text file export</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Trailing-blanks-for-text-file-export/m-p/323327#M1749</link>
      <description>&lt;P&gt;Sorry, its not clear to me what:&lt;/P&gt;
&lt;P&gt;"these I need to add blank spacing of 40 characters so the file will upload in a set format to external area."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This means? &amp;nbsp;Most programs read string in until a certain delimiter, then it doens't matter what length things are. &amp;nbsp;What exactly is it your trying to do, and if your coming up with your own file format structure, why does one of the standardly adopted file formats (such as CSV, XML etc.) not support your requirements? &amp;nbsp;Far simpler to use something already standard.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 11:34:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Trailing-blanks-for-text-file-export/m-p/323327#M1749</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-01-09T11:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Trailing blanks for text file export</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Trailing-blanks-for-text-file-export/m-p/323339#M1750</link>
      <description>&lt;P&gt;Hi there&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It has to be a text file to meet requirements so I need to stick with that I have to date&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Aidan&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 12:41:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Trailing-blanks-for-text-file-export/m-p/323339#M1750</guid>
      <dc:creator>Aidan</dc:creator>
      <dc:date>2017-01-09T12:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: Trailing blanks for text file export</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Trailing-blanks-for-text-file-export/m-p/323380#M1751</link>
      <description>&lt;P&gt;Instead of "add 40 spaces" think "set the fixed length of the output line"; That is the comibination LRECL= and RECFM=F with the FILE statement. Use the LRECL option to set the output line length. Coupled with the RECFM=F (fixed record format) then every line of the output file will be the length you specify. If there is nothing actually put in those columns at the end then the record is padded with blanks to make it the desired length.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 15:04:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Trailing-blanks-for-text-file-export/m-p/323380#M1751</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-01-09T15:04:29Z</dc:date>
    </item>
  </channel>
</rss>

