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.
Joined: 14 Jan 2008 Posts: 2504 Location: Atlanta, Georgia, USA
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 -