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 Sensitive data?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
manyamtej

New User


Joined: 14 Sep 2007
Posts: 3
Location: Bangalore

PostPosted: Thu Feb 12, 2009 8:01 pm    Post subject: How to mask Sensitive data?
Reply with quote

My requirement is to mask sensitive data such as bank account number.I want to display only last four digits.
For example ACCno 1234567890 should be displayed as ******7890 in output.
If possible please help me with piece of COBOL code.
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Feb 12, 2009 8:11 pm    Post subject:
Reply with quote

If the ACCno is all numeric:
Code:
03  ACCno pic 9(10)
03  ACCmask.
  05  filler pic x(6) value all '*'.
  05  ACCend pic 9(4).

Move ACCno to ACCend.
display ACCmask.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Feb 12, 2009 8:37 pm    Post subject: Re: How to mask Sensitive data?
Reply with quote

Several of us on this board have just completed a mandated task named PCI/DSS (Payment Card Industry/Data Security Standard), which basically encrypts/decrypts credit-card numbers internally.

I would recommend that you suggest to your management, to acquire some type of "stealthy" method/package to disguise any type of critical data, such as bank account no's, credit-card no's, etc.

It is easy enough to display only the last four positions of a given number but more importantly, using an encryption/decryption method to keep "roaming eyes" away from the "clear" internal representation of critical data is essential and (IMHO) perhaps could be a mandate between your shop and a given customer. In addition, using an encryption/decryption method may be viewed by other potential customers as a proactive step in assuring data-integrity (a good selling point), unless of course, it's a mandate.

Here's one method/example (although there are others) to mask bytes 01-06 with asteriks and display bytes 07-10 -

Code:

03  WS-ACCOUNT-NBR PIC 9(10) VALUE 1234567890.
03  WS-PATTERN PIC BBBBBB9999.
03  WS-PATTERN-X REDEFINES WS-PATTERN PIC X(10).

MOVE WS-ACCOUNT-NBR TO WS-PATTERN.

INSPECT WS-PATTERN-X CONVERTING SPACE TO '*'.

Regards,
Back to top
View user's profile Send private message
manyamtej

New User


Joined: 14 Sep 2007
Posts: 3
Location: Bangalore

PostPosted: Sat Feb 14, 2009 1:11 pm    Post subject: Reply to: How to mask Sensitive data?
Reply with quote

thank u all for the suggestions
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am


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