<?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: Function to Masking Numbers in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Function-to-Masking-Numbers/m-p/492619#M129480</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not very at ease with picture formats but i think this works :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
    picture mask
        0-9999999999 ='99999XXXXX' (mult=0.00001);
run;

data _null_;
    format a b mask.;
    a=9876543210;
    b=0012345678;
    put a= b=;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 05 Sep 2018 12:16:38 GMT</pubDate>
    <dc:creator>gamotte</dc:creator>
    <dc:date>2018-09-05T12:16:38Z</dc:date>
    <item>
      <title>Function to Masking Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Function-to-Masking-Numbers/m-p/492596#M129473</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;Do we have any function in SAS to mask the numbers?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i Have a variable name Ph_num like below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Input:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ph_Num:&lt;/P&gt;
&lt;P&gt;9876543210&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;required Output:&lt;/P&gt;
&lt;P&gt;98765xxxxx&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 11:09:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Function-to-Masking-Numbers/m-p/492596#M129473</guid>
      <dc:creator>gsreddy</dc:creator>
      <dc:date>2018-09-05T11:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: Function to Masking Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Function-to-Masking-Numbers/m-p/492599#M129476</link>
      <description>&lt;P&gt;What are the rules for masking as:&lt;/P&gt;
&lt;PRE&gt;want=cats(substr(ph_num,1,5),repeat('x',lengthn(ph_num)-5));&lt;/PRE&gt;
&lt;P&gt;Should work for your given example.&amp;nbsp; Or you could loop over the string etc.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 11:16:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Function-to-Masking-Numbers/m-p/492599#M129476</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-09-05T11:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Function to Masking Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Function-to-Masking-Numbers/m-p/492619#M129480</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not very at ease with picture formats but i think this works :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
    picture mask
        0-9999999999 ='99999XXXXX' (mult=0.00001);
run;

data _null_;
    format a b mask.;
    a=9876543210;
    b=0012345678;
    put a= b=;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Sep 2018 12:16:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Function-to-Masking-Numbers/m-p/492619#M129480</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2018-09-05T12:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Function to Masking Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Function-to-Masking-Numbers/m-p/492628#M129485</link>
      <description>&lt;P&gt;The only thing I would say there is that it doesn't change the underlying data, take the format away and the number displays as before.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 12:29:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Function-to-Masking-Numbers/m-p/492628#M129485</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-09-05T12:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Function to Masking Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Function-to-Masking-Numbers/m-p/492632#M129488</link>
      <description>Yes, it depends whether the goal is to store masked number or only use masks for publications. If the latter, using a format can be a solution.</description>
      <pubDate>Wed, 05 Sep 2018 12:44:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Function-to-Masking-Numbers/m-p/492632#M129488</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2018-09-05T12:44:30Z</dc:date>
    </item>
  </channel>
</rss>

