Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 2504
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 Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am
No new posts Extract Data till prev hour balaji81_k DB2 16 Fri Aug 25, 2017 9:25 pm
No new posts FTP data transfer from PC to Mainfram... AJAYREDDY All Other Mainframe Topics 8 Wed Aug 23, 2017 9:59 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts Paasing symbolic parameter to instrea... Robert Sample JCL & VSAM 2 Thu Jul 27, 2017 1:22 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us