<?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: separating an id variable that has characters and numbers. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/separating-an-id-variable-that-has-characters-and-numbers/m-p/483631#M125436</link>
    <description>&lt;P&gt;Thank you so much!!!!&lt;/P&gt;</description>
    <pubDate>Fri, 03 Aug 2018 00:28:52 GMT</pubDate>
    <dc:creator>mgrzyb</dc:creator>
    <dc:date>2018-08-03T00:28:52Z</dc:date>
    <item>
      <title>separating an id variable that has characters and numbers.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/separating-an-id-variable-that-has-characters-and-numbers/m-p/483615#M125427</link>
      <description>&lt;P&gt;Hello I hope you are all well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have IDs, such AB124008 in which AB = site of enrollment, 12, represents MD id, and 40008 represents the actual patient id in the study.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I looked through all&amp;nbsp; of Cody's books, or most, and know that I probably am missing something.&amp;nbsp;&lt;/P&gt;&lt;P&gt;They&amp;nbsp; are all character / text variables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do&amp;nbsp; I separate all the IDs into:&lt;/P&gt;&lt;P&gt;1) site of enrollment - want it to be a text var&lt;/P&gt;&lt;P&gt;2) physician code - want to it to be a number&lt;/P&gt;&lt;P&gt;3) actual id - want to be a number&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;I have many enrolled patients in the study.&amp;nbsp; I know there has to be an array to separate them.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 23:15:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/separating-an-id-variable-that-has-characters-and-numbers/m-p/483615#M125427</guid>
      <dc:creator>mgrzyb</dc:creator>
      <dc:date>2018-08-02T23:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: separating an id variable that has characters and numbers.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/separating-an-id-variable-that-has-characters-and-numbers/m-p/483618#M125429</link>
      <description>&lt;P&gt;is your question complete? Meaning do all your obs follow the same pattern for extraction? If yes,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data w;
k='AB124008';
siteofenrollment=substr(k,1,2);
physiciancode=input(substr(k,3,2),8.);
actualid=input(substr(k,5),8.);
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Aug 2018 23:20:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/separating-an-id-variable-that-has-characters-and-numbers/m-p/483618#M125429</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-08-02T23:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: separating an id variable that has characters and numbers.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/separating-an-id-variable-that-has-characters-and-numbers/m-p/483622#M125431</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/156253"&gt;@mgrzyb&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello I hope you are all well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have IDs, such AB124008 in which AB = site of enrollment, 12, represents MD id, and 40008 represents the actual patient id in the study.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I looked through all&amp;nbsp; of Cody's books, or most, and know that I probably am missing something.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;They&amp;nbsp; are all character / text variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do&amp;nbsp; I separate all the IDs into:&lt;/P&gt;
&lt;P&gt;1) site of enrollment - want it to be a text var&lt;/P&gt;
&lt;P&gt;2) physician code - want to it to be a number&lt;/P&gt;
&lt;P&gt;3) actual id - want to be a number&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;I have many enrolled patients in the study.&amp;nbsp; I know there has to be an array to separate them.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What arithmetic are you performing on physician code and actual id? If none, why a number?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 23:34:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/separating-an-id-variable-that-has-characters-and-numbers/m-p/483622#M125431</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-08-02T23:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: separating an id variable that has characters and numbers.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/separating-an-id-variable-that-has-characters-and-numbers/m-p/483631#M125436</link>
      <description>&lt;P&gt;Thank you so much!!!!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2018 00:28:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/separating-an-id-variable-that-has-characters-and-numbers/m-p/483631#M125436</guid>
      <dc:creator>mgrzyb</dc:creator>
      <dc:date>2018-08-03T00:28:52Z</dc:date>
    </item>
  </channel>
</rss>

