Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to mask the phone number

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
kumarinfy

New User


Joined: 30 Mar 2017
Posts: 2
Location: india

PostPosted: Mon Apr 03, 2017 5:23 pm    Post subject: how to mask the phone number
Reply with quote

Hi ,
could you please help me to prepare a select query to mask the phone no
my requirement is to mask the phone no except last 4 digits
please note that phone nos are not fixed length
Table column(PHONE_NO) having values like below
94758365494
0438278475859574
8428746857733774443

expected output should be like below
xxxxxxx5494
xxxxxxxxxxxx9574
xxxxxxxxxxxxxxx4443

Thanks in advance icon_smile.gif
Back to top
View user's profile Send private message

steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 526
Location: The Universe

PostPosted: Mon Apr 03, 2017 5:50 pm    Post subject:
Reply with quote

Do not post the same request in multiple forums.

It won't do you any good. For the most part the people willing to respond to your request visit the same forums, and if they see identical requests they will not respond to any of the requests.

This request has been in the beginners forum for nearly a week and there have been no responses. This means one of two things.
  1. It is not possible. OR
  2. It is facetious. If you do not want to display the phone number why is it in the data base to begin with?
It may be a better solution can be found in the agent displaying the contents of the data base
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10272
Location: italy

PostPosted: Mon Apr 03, 2017 6:09 pm    Post subject: Reply to: how to mask the phone number
Reply with quote

a telephone number is NOT a credit card number ...
showing the last four digits of a credit/debit card is a courtesy for the owner of the card


all over the world and for ages for telephone numbers it has been the other way around ...
mask the extension ( 3/4 digits )

irrelevant for 'private' numbers ,
most useful for business numbers where pass-trhu calls are not welcome

and remember ..

we reply on our own time and free of charge

if nobody replies it means that
nobody has an in depth knowledge of the topic
nobody is interested in answering
nobody likes You icon_biggrin.gif
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Mon Apr 03, 2017 6:19 pm    Post subject:
Reply with quote

Code:
concat(repeat('*',length(trim(tel))-4),right(trim(tel),4))
Back to top
View user's profile Send private message
kumarinfy

New User


Joined: 30 Mar 2017
Posts: 2
Location: india

PostPosted: Tue Apr 04, 2017 12:50 pm    Post subject: Reply to: how to mask the phone number
Reply with quote

Thank you so much
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts Edit large number of datasets (QSAM) zh_lad TSO/ISPF 3 Tue Apr 04, 2017 6:08 pm
No new posts what is meaning of the number in dcl Martylin PL/I & Assembler 2 Thu Mar 09, 2017 7:18 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts GDG version number PANDU1 JCL & VSAM 4 Sat Mar 04, 2017 8:28 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us