<?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: how to read in variables with trailing blanks in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-variables-with-trailing-blanks/m-p/166229#M263777</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you meant Leading blanks.&lt;/P&gt;&lt;P&gt;And do you want all of the data in a single variable containing the whole row of data? Something like&lt;/P&gt;&lt;P&gt;Var = '&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12341234123412341234&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 09808&amp;nbsp;&amp;nbsp; adrasf'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then a data step does that easily enough&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infile "your file name" LRECL=32000; /* or length of longest line*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input var $varying32000. ; /* again length of longest line*/&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 May 2014 16:48:14 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2014-05-20T16:48:14Z</dc:date>
    <item>
      <title>how to read in variables with trailing blanks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-variables-with-trailing-blanks/m-p/166226#M263774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a output file (.txt) that I would like to read in to SAS. The delimiter used in the file is blank. I want to read every row (where some variables start from the very first column while the others have trailing blanks in front of them). Is there a way that I can read every thing (all the variables including the ones after the trailing blanks) into SAS as one variable? I tried using semi colon with keyword, using @ to change the point, and some other ways and none of them worked. The output is attached. I would like to read in the row stating the warning message after the line "THE MODEL ESTIMATION TERMINATED NORMALLY".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 15:50:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-variables-with-trailing-blanks/m-p/166226#M263774</guid>
      <dc:creator>Gfish</dc:creator>
      <dc:date>2014-05-20T15:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to read in variables with trailing blanks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-variables-with-trailing-blanks/m-p/166227#M263775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you will have to provide the forum with at least a small subset of the data you are trying to read, as well as what you expect from that data as a result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 16:05:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-variables-with-trailing-blanks/m-p/166227#M263775</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-05-20T16:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to read in variables with trailing blanks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-variables-with-trailing-blanks/m-p/166228#M263776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the suggestion. I uploaded the output file. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 16:47:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-variables-with-trailing-blanks/m-p/166228#M263776</guid>
      <dc:creator>Gfish</dc:creator>
      <dc:date>2014-05-20T16:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to read in variables with trailing blanks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-variables-with-trailing-blanks/m-p/166229#M263777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you meant Leading blanks.&lt;/P&gt;&lt;P&gt;And do you want all of the data in a single variable containing the whole row of data? Something like&lt;/P&gt;&lt;P&gt;Var = '&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12341234123412341234&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 09808&amp;nbsp;&amp;nbsp; adrasf'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then a data step does that easily enough&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infile "your file name" LRECL=32000; /* or length of longest line*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input var $varying32000. ; /* again length of longest line*/&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 16:48:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-variables-with-trailing-blanks/m-p/166229#M263777</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-05-20T16:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to read in variables with trailing blanks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-variables-with-trailing-blanks/m-p/166230#M263778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry. My mistake. I did mean leading blanks. I tried the code and it works after I added the length of the variable after $varying informat. Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 18:32:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-variables-with-trailing-blanks/m-p/166230#M263778</guid>
      <dc:creator>Gfish</dc:creator>
      <dc:date>2014-05-20T18:32:07Z</dc:date>
    </item>
  </channel>
</rss>

