<?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: How do I separate one text variable into two numeric variables? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-do-I-separate-one-text-variable-into-two-numeric-variables/m-p/6410#M2510</link>
    <description>here is a solution with the use of scan function to separate words&lt;BR /&gt;
then i use another function to translate the numbers in characters into a numeric sas variable&lt;BR /&gt;
i showed, as you not precise give the length of the char variable, two start variables with the same information&lt;BR /&gt;
&lt;BR /&gt;
data a;&lt;BR /&gt;
 a="                136/80   ";&lt;BR /&gt;
 b="136/80";&lt;BR /&gt;
 c=input(left(scan(a,1,"/")),best12.);&lt;BR /&gt;
 d=input(scan(b,2,"/"),3.);&lt;BR /&gt;
 put c=  d=;&lt;BR /&gt;
 run;&lt;BR /&gt;
&lt;BR /&gt;
Andre</description>
    <pubDate>Thu, 17 Jan 2008 08:43:42 GMT</pubDate>
    <dc:creator>Andre</dc:creator>
    <dc:date>2008-01-17T08:43:42Z</dc:date>
    <item>
      <title>How do I separate one text variable into two numeric variables?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-do-I-separate-one-text-variable-into-two-numeric-variables/m-p/6409#M2509</link>
      <description>My variable is blood pressure (BP). For example the value is text and looks like:&lt;BR /&gt;
BP&lt;BR /&gt;
136/80&lt;BR /&gt;
&lt;BR /&gt;
How do I convert this variable into two separate numeric variables that look like:&lt;BR /&gt;
systolic &lt;BR /&gt;
136&lt;BR /&gt;
&lt;BR /&gt;
diastolic&lt;BR /&gt;
80&lt;BR /&gt;
&lt;BR /&gt;
Thanks.</description>
      <pubDate>Thu, 17 Jan 2008 06:49:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-do-I-separate-one-text-variable-into-two-numeric-variables/m-p/6409#M2509</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-01-17T06:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I separate one text variable into two numeric variables?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-do-I-separate-one-text-variable-into-two-numeric-variables/m-p/6410#M2510</link>
      <description>here is a solution with the use of scan function to separate words&lt;BR /&gt;
then i use another function to translate the numbers in characters into a numeric sas variable&lt;BR /&gt;
i showed, as you not precise give the length of the char variable, two start variables with the same information&lt;BR /&gt;
&lt;BR /&gt;
data a;&lt;BR /&gt;
 a="                136/80   ";&lt;BR /&gt;
 b="136/80";&lt;BR /&gt;
 c=input(left(scan(a,1,"/")),best12.);&lt;BR /&gt;
 d=input(scan(b,2,"/"),3.);&lt;BR /&gt;
 put c=  d=;&lt;BR /&gt;
 run;&lt;BR /&gt;
&lt;BR /&gt;
Andre</description>
      <pubDate>Thu, 17 Jan 2008 08:43:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-do-I-separate-one-text-variable-into-two-numeric-variables/m-p/6410#M2510</guid>
      <dc:creator>Andre</dc:creator>
      <dc:date>2008-01-17T08:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I separate one text variable into two numeric variables?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-do-I-separate-one-text-variable-into-two-numeric-variables/m-p/6411#M2511</link>
      <description>good

Message was edited by: Display name not found</description>
      <pubDate>Thu, 17 Jan 2008 17:52:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-do-I-separate-one-text-variable-into-two-numeric-variables/m-p/6411#M2511</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-01-17T17:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I separate one text variable into two numeric variables?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-do-I-separate-one-text-variable-into-two-numeric-variables/m-p/6412#M2512</link>
      <description>Thanks for the info. I used your example to make my code work.</description>
      <pubDate>Mon, 21 Jan 2008 16:44:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-do-I-separate-one-text-variable-into-two-numeric-variables/m-p/6412#M2512</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-01-21T16:44:05Z</dc:date>
    </item>
  </channel>
</rss>

