<?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: Change mixed variables to character in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645828#M193100</link>
    <description>from what I understand I guess this could be possible</description>
    <pubDate>Thu, 07 May 2020 11:48:32 GMT</pubDate>
    <dc:creator>tim-hahn</dc:creator>
    <dc:date>2020-05-07T11:48:32Z</dc:date>
    <item>
      <title>Change mixed variables to character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645814#M193090</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you very much for taking time to read this post.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have a Variable ISIN wich is the&amp;nbsp;International Securities Identification Number representing individual securities.It&amp;nbsp;is a 12-character alphanumeric code with&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;a formate like US0231351076 or US00163U1060 etc.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would like to transform it to a numeric variable still having the individual representation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;However my code only returns an empty column:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data work.neu;&lt;/P&gt;&lt;P&gt;set work.neu;&lt;/P&gt;&lt;P&gt;isin_num = input(ISIN, best12.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 10:45:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645814#M193090</guid>
      <dc:creator>tim-hahn</dc:creator>
      <dc:date>2020-05-07T10:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: Change mixed variables to character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645820#M193093</link>
      <description>&lt;P&gt;Is that second "U" valid in the second example? If not then this should help.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.neu2;
  set work.neu;
  isin_num = input(compress(ISIN,,"kd"), best12.);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;All the best&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 11:11:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645820#M193093</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2020-05-07T11:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Change mixed variables to character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645825#M193097</link>
      <description>&lt;P&gt;Can it be that one person is identified&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; by&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;US00163U1060&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt; and another&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; by&amp;nbsp;&lt;STRONG&gt;US00163X1060&amp;nbsp;-&amp;nbsp;&lt;/STRONG&gt;same digits but different alpha characters?&lt;/P&gt;
&lt;P&gt;if positive then you can't just use the digits eliminating the alpha characters.&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 11:40:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645825#M193097</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-05-07T11:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Change mixed variables to character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645827#M193099</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/35763"&gt;@yabwon&lt;/a&gt;&amp;nbsp;for your quick solution.&lt;/P&gt;&lt;P&gt;However, the second U is valid and also the zeros should not be eliminated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to change the Charaters to their decimal place in the alphabet?&lt;/P&gt;&lt;P&gt;So U would become 21 and S would become 12?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 11:43:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645827#M193099</guid>
      <dc:creator>tim-hahn</dc:creator>
      <dc:date>2020-05-07T11:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Change mixed variables to character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645828#M193100</link>
      <description>from what I understand I guess this could be possible</description>
      <pubDate>Thu, 07 May 2020 11:48:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645828#M193100</guid>
      <dc:creator>tim-hahn</dc:creator>
      <dc:date>2020-05-07T11:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Change mixed variables to character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645831#M193101</link>
      <description>&lt;P&gt;"U" or "X" are not digits, so you can't put that into a number without losing information.&lt;/P&gt;
&lt;P&gt;Big hint: identification codes (even if fully numeric) should ALWAYS be stored as character.&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 11:59:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645831#M193101</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-05-07T11:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Change mixed variables to character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645837#M193104</link>
      <description>&lt;P&gt;thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problem is I would like to merge two data sets by ISIN however this returns an ERROR: by variable ISIN is not on input dada set. And the resulting new data set has 0 observations.&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 12:04:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645837#M193104</guid>
      <dc:creator>tim-hahn</dc:creator>
      <dc:date>2020-05-07T12:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Change mixed variables to character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645838#M193105</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/326306"&gt;@tim-hahn&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My problem is I would like to merge two data sets by ISIN however this returns an ERROR: by variable ISIN is not on input dada set. And the resulting new data set has 0 observations.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That is &lt;STRONG&gt;NOT&lt;/STRONG&gt; a problem of numeric vs. character. Instead, the variable does not exist at all.&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 12:06:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645838#M193105</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-05-07T12:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Change mixed variables to character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645839#M193106</link>
      <description>Oh i thought because it is not numeric it can not be readed</description>
      <pubDate>Thu, 07 May 2020 12:07:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645839#M193106</guid>
      <dc:creator>tim-hahn</dc:creator>
      <dc:date>2020-05-07T12:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Change mixed variables to character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645842#M193108</link>
      <description>&lt;P&gt;And how would you later identify the digits in the number that represent a letter?&lt;/P&gt;
&lt;P&gt;Just think of this (taken from &lt;A href="https://en.wikipedia.org/wiki/International_Securities_Identification_Number" target="_blank" rel="noopener"&gt;https://en.wikipedia.org/wiki/International_Securities_Identification_Number&lt;/A&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;TREASURY CORP VICTORIA 5 3/4% 2005-2016: ISIN &lt;/SPAN&gt;&lt;STRONG&gt;AU0000XVGZA3&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 12:11:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645842#M193108</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-05-07T12:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: Change mixed variables to character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645845#M193110</link>
      <description>&lt;P&gt;is it possible that the variable name is different then ISIN and therefore you got the error message of:&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;variable ISIN is not on input ...&lt;/SPAN&gt;&lt;/STRONG&gt; ?&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 12:16:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645845#M193110</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-05-07T12:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Change mixed variables to character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645846#M193111</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/326306"&gt;@tim-hahn&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Oh i thought because it is not numeric it can not be readed&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Maxim 3: Know Your Data. This starts (after checking that a dataset exists in the first place) with looking which columns are present in the dataset.&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 12:20:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-mixed-variables-to-character/m-p/645846#M193111</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-05-07T12:20:10Z</dc:date>
    </item>
  </channel>
</rss>

