<?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: input text over varying number of lines no boundaries in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/input-text-over-varying-number-of-lines-no-boundaries/m-p/230593#M16749</link>
    <description>&lt;P&gt;The easiest way is probably to crawl through line by line instead of defining a block of lines.&amp;nbsp; The INPUT logic might read:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;input job_code $250.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;/ job_script $250.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;/ test $10.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;/ test $10.;&lt;/P&gt;
&lt;P&gt;if test &amp;gt; ' ' then input /;&lt;/P&gt;
&lt;P&gt;else input;&lt;/P&gt;
&lt;P&gt;drop test;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course if there are other variations, you will need to adjust again.&amp;nbsp; But that can be done ... you just need a good grasp of what is&amp;nbsp; in the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Oct 2015 15:18:22 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2015-10-19T15:18:22Z</dc:date>
    <item>
      <title>input text over varying number of lines no boundaries</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/input-text-over-varying-number-of-lines-no-boundaries/m-p/230586#M16748</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to read in a .txt file that stores information in sections, broken into lines like a paragraph, but the number of lines per section is unknown. There are two blank lines between each section, I really only need the first two lines from each section. Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN style="line-height: 20px;"&gt;.TXT TITLE LINE&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="line-height: 20px;"&gt;Job_Code1&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="line-height: 20px;"&gt;Job_script information&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="line-height: 20px;"&gt;Job_description_1&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;_blank&lt;/LI&gt;&lt;LI&gt;_blank&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="line-height: 20px;"&gt;Job_Code2&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="line-height: 20px;"&gt;Job_script information&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="line-height: 20px;"&gt;Job_description_1&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="line-height: 20px;"&gt;Job_description_2&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;_blank&lt;/LI&gt;&lt;LI&gt;_blank&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="line-height: 20px;"&gt;Job_Code3&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="line-height: 20px;"&gt;Job_script information&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="line-height: 20px;"&gt;Job_description_1&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the code I have so far which reads by line with a line specifier, but the problem is - in this case - job_code2 spans over 4 lines while the rest spans over 3. My code is very simple and I was hoping to keep it neat, maybe using a macro to define the line specifier but I don't have much experience with macros. Any ideas? My code to read by fixed number of lines:&lt;BR /&gt;&lt;BR /&gt;data want;&lt;BR /&gt;infile myText&amp;nbsp;firstobs=2 n=5 truncover;&lt;BR /&gt;input Job_code&amp;nbsp;$250. #2&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Job_script $250. #5;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2015 14:59:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/input-text-over-varying-number-of-lines-no-boundaries/m-p/230586#M16748</guid>
      <dc:creator>mhouse</dc:creator>
      <dc:date>2015-10-19T14:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: input text over varying number of lines no boundaries</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/input-text-over-varying-number-of-lines-no-boundaries/m-p/230593#M16749</link>
      <description>&lt;P&gt;The easiest way is probably to crawl through line by line instead of defining a block of lines.&amp;nbsp; The INPUT logic might read:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;input job_code $250.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;/ job_script $250.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;/ test $10.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;/ test $10.;&lt;/P&gt;
&lt;P&gt;if test &amp;gt; ' ' then input /;&lt;/P&gt;
&lt;P&gt;else input;&lt;/P&gt;
&lt;P&gt;drop test;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course if there are other variations, you will need to adjust again.&amp;nbsp; But that can be done ... you just need a good grasp of what is&amp;nbsp; in the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2015 15:18:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/input-text-over-varying-number-of-lines-no-boundaries/m-p/230593#M16749</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-10-19T15:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: input text over varying number of lines no boundaries</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/input-text-over-varying-number-of-lines-no-boundaries/m-p/230648#M16753</link>
      <description>&lt;P&gt;This worked perfectly for my &amp;nbsp;application. Thank you so much! Thank you for the quick help too.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2015 22:26:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/input-text-over-varying-number-of-lines-no-boundaries/m-p/230648#M16753</guid>
      <dc:creator>mhouse</dc:creator>
      <dc:date>2015-10-19T22:26:38Z</dc:date>
    </item>
  </channel>
</rss>

