<?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: RANUNI function implementation in CI in SAS Customer Intelligence</title>
    <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/RANUNI-function-implementation-in-CI/m-p/627558#M1438</link>
    <description>&lt;P&gt;Is there a reason you are not using the RAND function, which has excellent statistical properties and supports t&lt;A href="https://blogs.sas.com/content/iml/2013/02/04/the-table-distribution.html" target="_self"&gt;he Table distribution&lt;/A&gt; and &lt;A href="https://blogs.sas.com/content/iml/2015/10/05/random-integers-sas.html" target="_self"&gt;the discrete uniform ("Integer") distribution&lt;/A&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, if X is the 20-digit number,&lt;/P&gt;
&lt;P&gt;Compute Y by dividing X by 1E15, truncating to an integer, and then multiplying by 1E15.&lt;/P&gt;
&lt;P&gt;Compute Z as X - Y. The first digit of the 15-digit number Z is what you want.&lt;/P&gt;
&lt;P&gt;To get the first digit of Z, divide by 1E15 and truncate.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Feb 2020 16:20:20 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2020-02-26T16:20:20Z</dc:date>
    <item>
      <title>RANUNI function implementation in CI</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/RANUNI-function-implementation-in-CI/m-p/627232#M1432</link>
      <description>&lt;P&gt;Hello, I am facing some while implementing the RANUNI. Below is the definition of RAN UNI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FLOOR((MOD(&amp;lt;&amp;lt;/Client/ID CUID&amp;gt;&amp;gt;*397204094,(2**31)-1)/((2**31)-1)+1)*1000000000000000)&lt;/P&gt;&lt;P&gt;the above string will generate 20 digit random number then i need to select 5th digit of this number basis on the result need to apply cases like&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WHEN 5th Digit &amp;lt;2 THEN 'CG'&lt;BR /&gt;WHEN 5th Digit &lt;span class="lia-unicode-emoji" title=":red_heart:"&gt;❤️&lt;/span&gt; THEN 'D1'&lt;BR /&gt;WHEN 5th Digit &amp;lt;10 THEN 'D2'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am struggling to be able to covert form numeric to char then char to numeric. where&amp;nbsp;&amp;lt;&amp;lt;/Client/ID CUID&amp;gt;&amp;gt; variable is numeric.&lt;/P&gt;&lt;P&gt;I am getting error most of the time&amp;nbsp;&lt;/P&gt;&lt;P&gt;like &amp;lt;&amp;lt;root.field367&amp;gt;&amp;gt; is invalid and can't be used in query&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>Tue, 25 Feb 2020 16:30:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/RANUNI-function-implementation-in-CI/m-p/627232#M1432</guid>
      <dc:creator>ravindrrapaal</dc:creator>
      <dc:date>2020-02-25T16:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: RANUNI function implementation in CI</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/RANUNI-function-implementation-in-CI/m-p/627558#M1438</link>
      <description>&lt;P&gt;Is there a reason you are not using the RAND function, which has excellent statistical properties and supports t&lt;A href="https://blogs.sas.com/content/iml/2013/02/04/the-table-distribution.html" target="_self"&gt;he Table distribution&lt;/A&gt; and &lt;A href="https://blogs.sas.com/content/iml/2015/10/05/random-integers-sas.html" target="_self"&gt;the discrete uniform ("Integer") distribution&lt;/A&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, if X is the 20-digit number,&lt;/P&gt;
&lt;P&gt;Compute Y by dividing X by 1E15, truncating to an integer, and then multiplying by 1E15.&lt;/P&gt;
&lt;P&gt;Compute Z as X - Y. The first digit of the 15-digit number Z is what you want.&lt;/P&gt;
&lt;P&gt;To get the first digit of Z, divide by 1E15 and truncate.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 16:20:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/RANUNI-function-implementation-in-CI/m-p/627558#M1438</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2020-02-26T16:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: RANUNI function implementation in CI</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/RANUNI-function-implementation-in-CI/m-p/631661#M1450</link>
      <description>Thank you so much for your response. The solution worked</description>
      <pubDate>Thu, 12 Mar 2020 17:53:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/RANUNI-function-implementation-in-CI/m-p/631661#M1450</guid>
      <dc:creator>ravindrrapaal</dc:creator>
      <dc:date>2020-03-12T17:53:23Z</dc:date>
    </item>
  </channel>
</rss>

