<?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: Preserving leading spaces in txt file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Preserving-leading-spaces-in-txt-file/m-p/688210#M209024</link>
    <description>&lt;P&gt;Data is critical for such as this.&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since this is an output related task then likely only need to provide 5 lines of actual data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;THEN you need to provide text as you expect that output to appear. Post such text in a code box opened with the &amp;lt;/&amp;gt; because the main message windows &lt;STRONG&gt;will remove&lt;/STRONG&gt; white space characters like blanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is extremely likely that your existing vales do not contain leading spaces.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Oct 2020 14:24:04 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-10-01T14:24:04Z</dc:date>
    <item>
      <title>Preserving leading spaces in txt file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Preserving-leading-spaces-in-txt-file/m-p/688184#M209012</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm exporting data from the sas dataset into .txt file with preserving leading spaces. In the sas dataset there are around 50 columns and only one column (REF) has leading spaces.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;filename XAB "&amp;amp;SOURCE_FILE";&lt;/P&gt;
&lt;P&gt;data _null_;&lt;BR /&gt;set TEMP_XAB;&lt;BR /&gt;file XAB dsd dlm='|';&lt;BR /&gt;put (_all_) (+0)&amp;nbsp; REF $char15.;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if I have the code as like above, it creates an extra column with leading spaces for REF column in txt. file.&lt;/P&gt;
&lt;P&gt;Even I will not able to put all the 50 column names and only for that REF column will have that char format in the put statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any possible way to have that only column as format char string and the remaining column as it is from the dataset before creating the .txt file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2020 13:12:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Preserving-leading-spaces-in-txt-file/m-p/688184#M209012</guid>
      <dc:creator>helannivas88</dc:creator>
      <dc:date>2020-10-01T13:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Preserving leading spaces in txt file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Preserving-leading-spaces-in-txt-file/m-p/688210#M209024</link>
      <description>&lt;P&gt;Data is critical for such as this.&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since this is an output related task then likely only need to provide 5 lines of actual data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;THEN you need to provide text as you expect that output to appear. Post such text in a code box opened with the &amp;lt;/&amp;gt; because the main message windows &lt;STRONG&gt;will remove&lt;/STRONG&gt; white space characters like blanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is extremely likely that your existing vales do not contain leading spaces.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2020 14:24:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Preserving-leading-spaces-in-txt-file/m-p/688210#M209024</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-10-01T14:24:04Z</dc:date>
    </item>
  </channel>
</rss>

