<?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: Constructing a string from parsed data stored in ordered fields in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Constructing-a-string-from-parsed-data-stored-in-ordered-fields/m-p/105805#M22041</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This will do it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data Input;&lt;BR /&gt;&amp;nbsp; length desc $16;&lt;BR /&gt;&amp;nbsp; input Qtype&amp;nbsp;&amp;nbsp;&amp;nbsp; Nod_ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Nod_Type&amp;nbsp;&amp;nbsp; Desc $;&lt;BR /&gt;&amp;nbsp; datalines;&lt;BR /&gt;1000&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&amp;nbsp;&amp;nbsp;&amp;nbsp; and&lt;BR /&gt;1000&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; likes&lt;BR /&gt;1000&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; He&lt;BR /&gt;1000&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cats&lt;BR /&gt;1000&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; likes&lt;BR /&gt;1000&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; She&lt;BR /&gt;1000&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dogs&lt;BR /&gt;1000&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; like&lt;BR /&gt;1000&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; They&lt;BR /&gt;1000&amp;nbsp; 10&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; animals&lt;BR /&gt;1000&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&amp;nbsp;&amp;nbsp;&amp;nbsp; Or&lt;BR /&gt;1000&amp;nbsp; 12&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; eat&lt;BR /&gt;1000&amp;nbsp; 13&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; They&lt;BR /&gt;1000&amp;nbsp; 14&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; meat&lt;BR /&gt;1000&amp;nbsp; 15&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; eat&lt;BR /&gt;1000&amp;nbsp; 16&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; They&lt;BR /&gt;1000&amp;nbsp; 17&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vegetables&lt;BR /&gt;111&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; likes&lt;BR /&gt;111&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bill&lt;BR /&gt;111&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hamsters&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data clauses(keep=qtype str);&lt;BR /&gt;retain j s v c str;&lt;BR /&gt;length j s v c $16 str $200;&lt;BR /&gt;set input;&lt;BR /&gt;by qtype notsorted;&lt;BR /&gt;if first.qtype then call missing(str, j);&lt;BR /&gt;select (nod_Type);&lt;BR /&gt;when (8) s = desc;&lt;BR /&gt;when (9) c = desc;&lt;BR /&gt;when (11) v = desc;&lt;BR /&gt;when (15) j = desc;&lt;BR /&gt;end;&lt;BR /&gt;if cmiss(s, v, c) = 0 then do;&lt;BR /&gt; str = catx(cat(" ", trim(j), " "), str, catx(" ", s, v, c));&lt;BR /&gt; call missing (s, v, c);&lt;BR /&gt;end;&lt;BR /&gt;if last.qtype then output;&lt;BR /&gt;run;&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, 07 May 2012 16:30:57 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2012-05-07T16:30:57Z</dc:date>
    <item>
      <title>Constructing a string from parsed data stored in ordered fields</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Constructing-a-string-from-parsed-data-stored-in-ordered-fields/m-p/105800#M22036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a SAS puzzle I need help with. I have a table structured like below. In the fake data below, the Desc field has the bits of a phrase that belong to each different Qtype. The final phrases are in the second table below that shows ideally what I'd like to have.&lt;/P&gt;&lt;P&gt;The rules for parsing the phase makes this a difficult challenge for me. The Qtype determines what Desc are grouped together. The N_ID determines what order to put the data for each Qtype in. The N_Type determines the sub-order.&lt;/P&gt;&lt;P&gt;Here is where it gets even harder to explain. N_Type = 15 acts as a conjunction between sets of N_Type 8, 11 and 9 (in that order) below it until it finds another 15.&lt;/P&gt;&lt;P&gt;Also, a space will need to be added between each Desc once put together.&lt;/P&gt;&lt;P&gt;Looking at the examples below will probably answer most questions but let me know if it doesn’t.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;What I have:&lt;/EM&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="padding-bottom: 0px; padding-left: 5.4pt; width: 357px; padding-right: 5.4pt; margin-left: 4.65pt; padding-top: 0px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="padding-left: 5.4pt; padding-right: 5.4pt; border: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;&lt;STRONG&gt;Qtype&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;&lt;STRONG&gt;N_ID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid;" valign="bottom" width="71"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;&lt;STRONG&gt;N_Type&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;&lt;STRONG&gt;Desc&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;1000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;15&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;and&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;1000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;11&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;likes&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;1000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;3&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;8&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;He&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;1000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;4&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;9&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;cats&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;1000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;5&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;11&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;likes&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;1000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;6&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;8&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;She&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;1000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;7&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;9&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;dogs&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;1000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;8&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;11&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;like&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;1000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;9&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;8&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;They&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;1000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;10&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;9&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;animals&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;1000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;11&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;15&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;Or&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;1000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;12&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;11&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;eat&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;1000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;13&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;8&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;They&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;1000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;14&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;9&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;meat&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;1000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;15&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;11&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;eat&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;1000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;16&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;8&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;They&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;1000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;17&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;9&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;vegetables&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;111&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;11&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;likes&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;111&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;3&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;8&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;Bill&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;111&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;4&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;9&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;hamsters&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;What I need&lt;/EM&gt;:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="padding-bottom: 0px; padding-left: 5.4pt; padding-right: 5.4pt; margin-left: 4.65pt; padding-top: 0px;" width="671"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="padding-left: 5.4pt; padding-right: 5.4pt;" valign="bottom" width="64"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;&lt;STRONG&gt;Qtype&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding-left: 5.4pt; padding-right: 5.4pt;" valign="bottom" width="607"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;&lt;STRONG&gt;ParsedString&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="padding-left: 5.4pt; padding-right: 5.4pt; border: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;1000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid;" valign="bottom" width="607"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;He likes cats and She likes dogs and They like animals Or They eat meat Or They eat vegetables&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;111&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid;" valign="bottom" width="607"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;Bill likes hamsters&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Mishka1 One&#xD;
Added: Also, a space will need to be added between each Desc once put together.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2012 03:03:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Constructing-a-string-from-parsed-data-stored-in-ordered-fields/m-p/105800#M22036</guid>
      <dc:creator>Mishka1</dc:creator>
      <dc:date>2012-05-07T03:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Constructing a string from parsed data stored in ordered fields</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Constructing-a-string-from-parsed-data-stored-in-ordered-fields/m-p/105801#M22037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Should have added this to get you started:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;Data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; Input;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; Qtype&amp;nbsp;&amp;nbsp;&amp;nbsp; Nod_ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Nod_Type&amp;nbsp;&amp;nbsp; Desc $;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;1000&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&amp;nbsp;&amp;nbsp;&amp;nbsp; and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;1000&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; likes&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;1000&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; He&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;1000&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cats&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;1000&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; likes&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;1000&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; She&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;1000&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dogs&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;1000&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; like&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;1000&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; They&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;1000&amp;nbsp; 10&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; animals&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;1000&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&amp;nbsp;&amp;nbsp;&amp;nbsp; Or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;1000&amp;nbsp; 12&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; eat&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;1000&amp;nbsp; 13&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; They&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;1000&amp;nbsp; 14&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; meat&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;1000&amp;nbsp; 15&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; eat&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;1000&amp;nbsp; 16&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; They&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;1000&amp;nbsp; 17&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vegetables&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;111&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; likes&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;111&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bill&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;111&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hamsters&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2012 03:13:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Constructing-a-string-from-parsed-data-stored-in-ordered-fields/m-p/105801#M22037</guid>
      <dc:creator>Mishka1</dc:creator>
      <dc:date>2012-05-07T03:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: Constructing a string from parsed data stored in ordered fields</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Constructing-a-string-from-parsed-data-stored-in-ordered-fields/m-p/105802#M22038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But I can't get the right order of these words.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="-moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding-right: 5.4pt; padding-left: 5.4pt;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;111&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="-moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding-right: 5.4pt; padding-left: 5.4pt;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="-moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding-right: 5.4pt; padding-left: 5.4pt;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;11&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="-moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding-right: 5.4pt; padding-left: 5.4pt;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;likes&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;&amp;lt;-- should be Second&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="-moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding-right: 5.4pt; padding-left: 5.4pt;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;111&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="-moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding-right: 5.4pt; padding-left: 5.4pt;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;3&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="-moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding-right: 5.4pt; padding-left: 5.4pt;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;8&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="-moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding-right: 5.4pt; padding-left: 5.4pt;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;Bill &amp;lt;-- should be First&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="-moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding-right: 5.4pt; padding-left: 5.4pt;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;111&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="-moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding-right: 5.4pt; padding-left: 5.4pt;" valign="bottom" width="64"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;4&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="-moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding-right: 5.4pt; padding-left: 5.4pt;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;9&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="-moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding-right: 5.4pt; padding-left: 5.4pt;" valign="bottom" width="159"&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;hamsters&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;&amp;lt;-- should be Third&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;11 8 9 is not the order I need.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2012 07:47:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Constructing-a-string-from-parsed-data-stored-in-ordered-fields/m-p/105802#M22038</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-05-07T07:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Constructing a string from parsed data stored in ordered fields</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Constructing-a-string-from-parsed-data-stored-in-ordered-fields/m-p/105803#M22039</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;Try this..not an optimal solution but it may suffice your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data Input;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input Qtype&amp;nbsp;&amp;nbsp;&amp;nbsp; Nod_ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Nod_Type&amp;nbsp;&amp;nbsp; Desc $;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if nod_type=8 then t=1;&lt;/P&gt;&lt;P&gt;if nod_type=11 then t=2;&lt;/P&gt;&lt;P&gt;if nod_type=9 then t=3;&lt;/P&gt;&lt;P&gt;if nod_type=15 then t=4;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;1000&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&amp;nbsp;&amp;nbsp;&amp;nbsp; and&lt;/P&gt;&lt;P&gt;1000&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; likes&lt;/P&gt;&lt;P&gt;1000&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; He&lt;/P&gt;&lt;P&gt;1000&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cats&lt;/P&gt;&lt;P&gt;1000&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; likes&lt;/P&gt;&lt;P&gt;1000&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; She&lt;/P&gt;&lt;P&gt;1000&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dogs&lt;/P&gt;&lt;P&gt;1000&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; like&lt;/P&gt;&lt;P&gt;1000&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; They&lt;/P&gt;&lt;P&gt;1000&amp;nbsp; 10&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; animals&lt;/P&gt;&lt;P&gt;1000&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&amp;nbsp;&amp;nbsp;&amp;nbsp; Or&lt;/P&gt;&lt;P&gt;1000&amp;nbsp; 12&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; eat&lt;/P&gt;&lt;P&gt;1000&amp;nbsp; 13&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; They&lt;/P&gt;&lt;P&gt;1000&amp;nbsp; 14&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; meat&lt;/P&gt;&lt;P&gt;1000&amp;nbsp; 15&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; eat&lt;/P&gt;&lt;P&gt;1000&amp;nbsp; 16&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; They&lt;/P&gt;&lt;P&gt;1000&amp;nbsp; 17&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vegetables&lt;/P&gt;&lt;P&gt;111&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; likes&lt;/P&gt;&lt;P&gt;111&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bill&lt;/P&gt;&lt;P&gt;111&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hamsters&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=input;by&amp;nbsp; Qtype t ;run;&lt;/P&gt;&lt;P&gt;proc transpose data=input out=tt let;&lt;/P&gt;&lt;P&gt;by qtype t;&lt;/P&gt;&lt;P&gt;var desc;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc transpose data=tt out=want(where=(_1 ne '')) let;&lt;/P&gt;&lt;P&gt;id t ;&lt;/P&gt;&lt;P&gt;var col1 col2 col3 col4 col5;&lt;/P&gt;&lt;P&gt;by qtype;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;set want;&lt;/P&gt;&lt;P&gt;xx=CATx('',OF _1 -_4);&lt;/P&gt;&lt;P&gt;drop&amp;nbsp; _:;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;Data Need ; &lt;/P&gt;&lt;P&gt;Length ParsedString $ 400 ; &lt;/P&gt;&lt;P&gt;Set test ;&lt;/P&gt;&lt;P&gt;by qtype; &lt;/P&gt;&lt;P&gt;Retain ParsedString ; &lt;/P&gt;&lt;P&gt;ParsedString = CatX( '' , ParsedString , xx ) ; &lt;/P&gt;&lt;P&gt;if last.qtype then output;&lt;/P&gt;&lt;P&gt;drop xx;&lt;/P&gt;&lt;P&gt;Run ; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2012 09:49:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Constructing-a-string-from-parsed-data-stored-in-ordered-fields/m-p/105803#M22039</guid>
      <dc:creator>shivas</dc:creator>
      <dc:date>2012-05-07T09:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: Constructing a string from parsed data stored in ordered fields</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Constructing-a-string-from-parsed-data-stored-in-ordered-fields/m-p/105804#M22040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is close. The value in nod_type=15 needs to be repeatedly inserted between each of the combined (8,11,9) strings. So it's 8,9,11,&lt;STRONG&gt;15&lt;/STRONG&gt;,8,9,11,&lt;STRONG&gt;15&lt;/STRONG&gt;. I think by this method we lose the order of the Desc values from Nod_ID which determines which nod_type=15 Desc value will be inserted between the groups. This is a great start and I'll try working with it. Thank you!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2012 11:32:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Constructing-a-string-from-parsed-data-stored-in-ordered-fields/m-p/105804#M22040</guid>
      <dc:creator>Mishka1</dc:creator>
      <dc:date>2012-05-07T11:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Constructing a string from parsed data stored in ordered fields</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Constructing-a-string-from-parsed-data-stored-in-ordered-fields/m-p/105805#M22041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This will do it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data Input;&lt;BR /&gt;&amp;nbsp; length desc $16;&lt;BR /&gt;&amp;nbsp; input Qtype&amp;nbsp;&amp;nbsp;&amp;nbsp; Nod_ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Nod_Type&amp;nbsp;&amp;nbsp; Desc $;&lt;BR /&gt;&amp;nbsp; datalines;&lt;BR /&gt;1000&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&amp;nbsp;&amp;nbsp;&amp;nbsp; and&lt;BR /&gt;1000&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; likes&lt;BR /&gt;1000&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; He&lt;BR /&gt;1000&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cats&lt;BR /&gt;1000&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; likes&lt;BR /&gt;1000&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; She&lt;BR /&gt;1000&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dogs&lt;BR /&gt;1000&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; like&lt;BR /&gt;1000&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; They&lt;BR /&gt;1000&amp;nbsp; 10&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; animals&lt;BR /&gt;1000&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&amp;nbsp;&amp;nbsp;&amp;nbsp; Or&lt;BR /&gt;1000&amp;nbsp; 12&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; eat&lt;BR /&gt;1000&amp;nbsp; 13&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; They&lt;BR /&gt;1000&amp;nbsp; 14&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; meat&lt;BR /&gt;1000&amp;nbsp; 15&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; eat&lt;BR /&gt;1000&amp;nbsp; 16&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; They&lt;BR /&gt;1000&amp;nbsp; 17&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vegetables&lt;BR /&gt;111&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; likes&lt;BR /&gt;111&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bill&lt;BR /&gt;111&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hamsters&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data clauses(keep=qtype str);&lt;BR /&gt;retain j s v c str;&lt;BR /&gt;length j s v c $16 str $200;&lt;BR /&gt;set input;&lt;BR /&gt;by qtype notsorted;&lt;BR /&gt;if first.qtype then call missing(str, j);&lt;BR /&gt;select (nod_Type);&lt;BR /&gt;when (8) s = desc;&lt;BR /&gt;when (9) c = desc;&lt;BR /&gt;when (11) v = desc;&lt;BR /&gt;when (15) j = desc;&lt;BR /&gt;end;&lt;BR /&gt;if cmiss(s, v, c) = 0 then do;&lt;BR /&gt; str = catx(cat(" ", trim(j), " "), str, catx(" ", s, v, c));&lt;BR /&gt; call missing (s, v, c);&lt;BR /&gt;end;&lt;BR /&gt;if last.qtype then output;&lt;BR /&gt;run;&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, 07 May 2012 16:30:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Constructing-a-string-from-parsed-data-stored-in-ordered-fields/m-p/105805#M22041</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-05-07T16:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Constructing a string from parsed data stored in ordered fields</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Constructing-a-string-from-parsed-data-stored-in-ordered-fields/m-p/105806#M22042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or more compact:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data clauses(keep=qtype str);&lt;/P&gt;&lt;P&gt;length s c x v j $16 str $200;&lt;/P&gt;&lt;P&gt;array a{8:15} s c x v x x x j;&lt;/P&gt;&lt;P&gt;do until (last.qtype);&lt;/P&gt;&lt;P&gt; set input;&lt;/P&gt;&lt;P&gt; by qtype notsorted;&lt;/P&gt;&lt;P&gt; a{nod_Type} = desc;&lt;/P&gt;&lt;P&gt; if cmiss(s, v, c) = 0 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; str = catx(cat(" ", trim(j), " "), str, catx(" ", s, v, c));&lt;/P&gt;&lt;P&gt;&amp;nbsp; call missing (s, v, c);&lt;/P&gt;&lt;P&gt; end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;run;&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, 07 May 2012 17:23:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Constructing-a-string-from-parsed-data-stored-in-ordered-fields/m-p/105806#M22042</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-05-07T17:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Constructing a string from parsed data stored in ordered fields</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Constructing-a-string-from-parsed-data-stored-in-ordered-fields/m-p/105807#M22043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome manipulation! Can you describe what the 'x' is doing in the first definition and array?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2012 19:25:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Constructing-a-string-from-parsed-data-stored-in-ordered-fields/m-p/105807#M22043</guid>
      <dc:creator>Mishka1</dc:creator>
      <dc:date>2012-05-07T19:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Constructing a string from parsed data stored in ordered fields</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Constructing-a-string-from-parsed-data-stored-in-ordered-fields/m-p/105808#M22044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, x is a scratch variable that gets the value from Desc if nod_type is not one of the expected values. A useful feature of that solution is that it accepts duplicates and any ordering of the words, as long as the nod_type=15 word doesn't arrive last.Incomplete clauses are also tolerated and ignored.&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, 07 May 2012 19:42:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Constructing-a-string-from-parsed-data-stored-in-ordered-fields/m-p/105808#M22044</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-05-07T19:42:56Z</dc:date>
    </item>
  </channel>
</rss>

