<?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 Place portion of text from a variable into new variable in SAS Health and Life Sciences</title>
    <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Place-portion-of-text-from-a-variable-into-new-variable/m-p/29739#M1130</link>
    <description>I have a dataset that has one field, "progNote" with max size=32767. This variable contains some information I am interested in. I want to extract a portion of the text in this variable and place into a new variable. The begining of the text I want to extract is always the same which is "MILITARY HISTORY:". I want to extract text starting from the M in Military to 300 characters after for all records. Is there a way to do this in SAS. Thanks.</description>
    <pubDate>Tue, 08 Jul 2008 19:58:51 GMT</pubDate>
    <dc:creator>WAL83</dc:creator>
    <dc:date>2008-07-08T19:58:51Z</dc:date>
    <item>
      <title>Place portion of text from a variable into new variable</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Place-portion-of-text-from-a-variable-into-new-variable/m-p/29739#M1130</link>
      <description>I have a dataset that has one field, "progNote" with max size=32767. This variable contains some information I am interested in. I want to extract a portion of the text in this variable and place into a new variable. The begining of the text I want to extract is always the same which is "MILITARY HISTORY:". I want to extract text starting from the M in Military to 300 characters after for all records. Is there a way to do this in SAS. Thanks.</description>
      <pubDate>Tue, 08 Jul 2008 19:58:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Place-portion-of-text-from-a-variable-into-new-variable/m-p/29739#M1130</guid>
      <dc:creator>WAL83</dc:creator>
      <dc:date>2008-07-08T19:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Place portion of text from a variable into new variable</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Place-portion-of-text-from-a-variable-into-new-variable/m-p/29740#M1131</link>
      <description>Something like :&lt;BR /&gt;
[pre]&lt;BR /&gt;
LENGTH excerpt $ 300 ;&lt;BR /&gt;
start = INDEXW(progNote, "MILITARY HISTORY") ;&lt;BR /&gt;
IF start &amp;gt; 0 THEN excerpt = SUBSTR(progNote, start) ;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
may solve your problem.&lt;BR /&gt;
&lt;BR /&gt;
Olivier</description>
      <pubDate>Wed, 09 Jul 2008 09:38:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Place-portion-of-text-from-a-variable-into-new-variable/m-p/29740#M1131</guid>
      <dc:creator>Olivier</dc:creator>
      <dc:date>2008-07-09T09:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Place portion of text from a variable into new variable</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Place-portion-of-text-from-a-variable-into-new-variable/m-p/29741#M1132</link>
      <description>Sorry I haven't gotten back sooner. I acutally solved my problem using VBA and Access. Thanks.</description>
      <pubDate>Wed, 13 Aug 2008 21:45:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Place-portion-of-text-from-a-variable-into-new-variable/m-p/29741#M1132</guid>
      <dc:creator>WAL83</dc:creator>
      <dc:date>2008-08-13T21:45:18Z</dc:date>
    </item>
  </channel>
</rss>

