<?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: Reading from text file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-from-text-file/m-p/159882#M31127</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simply use option DLM= and hanging @@ :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data want;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;infile datalines dlm='^';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;length var1 $64;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;input var1 @@;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;datalines;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This is my text file this is my text file ^ This is my ^ This is&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This is my text file this is my text file ^ This is my ^ This is&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This is my text file this is my text file ^ This is my ^ This is&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc print data=want noobs; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Feb 2014 04:48:17 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2014-02-03T04:48:17Z</dc:date>
    <item>
      <title>Reading from text file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-from-text-file/m-p/159881#M31126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a text file that has really long string with delimiter as ^ inbetween.&lt;/P&gt;&lt;P&gt;I want to read in this file as SAS dataset such it will be read in under a single varaibale (Say VAR1) with different observations whenever it encounters the delimiter '^'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say the text file is as below&lt;/P&gt;&lt;P&gt;"This is my text file this is my text file ^ This is my ^ This is "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the dataset should be read in as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OBS&amp;nbsp; VAR1&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This is my text file this is my text file&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This is my&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to read in this text file as the example shown above? SAS Gurus, Please advise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Feb 2014 04:30:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-from-text-file/m-p/159881#M31126</guid>
      <dc:creator>geoonline</dc:creator>
      <dc:date>2014-02-03T04:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from text file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-from-text-file/m-p/159882#M31127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simply use option DLM= and hanging @@ :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data want;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;infile datalines dlm='^';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;length var1 $64;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;input var1 @@;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;datalines;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This is my text file this is my text file ^ This is my ^ This is&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This is my text file this is my text file ^ This is my ^ This is&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This is my text file this is my text file ^ This is my ^ This is&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc print data=want noobs; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Feb 2014 04:48:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-from-text-file/m-p/159882#M31127</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-02-03T04:48:17Z</dc:date>
    </item>
  </channel>
</rss>

