<?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: Read multiple lines as a paragraph into a single variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Read-multiple-lines-as-a-paragraph-into-a-single-variable/m-p/732483#M228243</link>
    <description>Thank you for your help</description>
    <pubDate>Fri, 09 Apr 2021 12:52:18 GMT</pubDate>
    <dc:creator>kaziumair</dc:creator>
    <dc:date>2021-04-09T12:52:18Z</dc:date>
    <item>
      <title>Read multiple lines as a paragraph into a single variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-multiple-lines-as-a-paragraph-into-a-single-variable/m-p/732479#M228241</link>
      <description>&lt;P&gt;Hi everyone , I have scraped an article from a website . The website had paragraphs written in a series of &amp;lt;p&amp;gt; tags , as a result , the dataset I created consists of one paragraph on one line.&lt;/P&gt;&lt;P&gt;I want to create a variable that consists of approximately 5000 words in a column called article consisting of various paragraphs, but I am unable to figure out how to read multiple data set lines into one single column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example Dataset looks something like this :&lt;BR /&gt;1)&lt;SPAN&gt;Alphabet's Google has reached licensing deals with over 600 news outlets around the world and is seeing a "huge increase" in users requesting more content from specific publications as part of a new programme, it said on Wednesday&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2)&lt;SPAN&gt;The update comes as big Internet service providers including&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://gadgets.ndtv.com/tags/facebook" target="_self"&gt;Facebook&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;have been locked in bitter disputes over fair compensation to publishers&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected result&lt;/P&gt;&lt;P&gt;para =&amp;nbsp;&amp;nbsp;Alphabet's Google has reached licensing deals with over 600 news outlets around the world and is seeing a "huge increase" in users requesting more content from specific publications as part of a new programme, it said on Wednesday. The update comes as big Internet service providers including&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://gadgets.ndtv.com/tags/facebook" target="_self"&gt;Facebook&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;have been locked in bitter disputes over fair compensation to publishers.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data paragraphs;
input story &amp;amp; $800.;
datalines;
Alphabet's Google has reached licensing deals with over 600 news outlets around the world and is seeing a "huge increase" in users requesting more content from specific publications as part of a new programme, it said on Wednesday
The update comes as big Internet service providers including&amp;nbsp;Facebook&amp;nbsp;have been locked in bitter disputes over fair compensation to publishers.
;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 11:56:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-multiple-lines-as-a-paragraph-into-a-single-variable/m-p/732479#M228241</guid>
      <dc:creator>kaziumair</dc:creator>
      <dc:date>2021-04-09T11:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: Read multiple lines as a paragraph into a single variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-multiple-lines-as-a-paragraph-into-a-single-variable/m-p/732480#M228242</link>
      <description>&lt;P&gt;Here's one way, I believe. There are certainly other solutions that are crafty and innovative, but I think this one is reasonably intuitive. I'd imagine you're going to need to give these some grouping ID or sequence ID if you're dealing with a lot of &amp;lt;p&amp;gt; tags. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data paragraphs;
input story &amp;amp; $800.;
datalines;
Alphabet's Google has reached licensing deals with over 600 news outlets around the world and is seeing a "huge increase" in users requesting more content from specific publications as part of a new programme, it said on Wednesday
The update comes as big Internet service providers including Facebook have been locked in bitter disputes over fair compensation to publishers.
;

proc transpose data = paragraphs out = paragraphs_t;
	var story;
run;

data paragraphs_want;
	length want_catx $800.; /* Set arbitrary length - CATX defaults to 200, which won't fit your needs. */
	set paragraphs_t;
	want_catx = catx(". ", col1, col2); 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;Obs want_catx 
1 Alphabet's Google has reached licensing deals with over 600 news outlets around the world and is seeing a "huge increase" in users requesting more content from specific publications as part of a new programme, it said on Wednesday. The update comes as big Internet service providers including Facebook have been locked in bitter disputes over fair compensation to publishers. 
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 12:23:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-multiple-lines-as-a-paragraph-into-a-single-variable/m-p/732480#M228242</guid>
      <dc:creator>maguiremq</dc:creator>
      <dc:date>2021-04-09T12:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: Read multiple lines as a paragraph into a single variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-multiple-lines-as-a-paragraph-into-a-single-variable/m-p/732483#M228243</link>
      <description>Thank you for your help</description>
      <pubDate>Fri, 09 Apr 2021 12:52:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-multiple-lines-as-a-paragraph-into-a-single-variable/m-p/732483#M228243</guid>
      <dc:creator>kaziumair</dc:creator>
      <dc:date>2021-04-09T12:52:18Z</dc:date>
    </item>
  </channel>
</rss>

