View previous topic :: View next topic |
Author |
Message |
hari108 Beginner

Joined: 03 Feb 2006 Posts: 16 Topics: 4
|
Posted: Tue Jun 16, 2009 4:39 am Post subject: Character masking using COBOL? |
|
|
Hi, I have a requirement to mask certain records.
For e.g;
Suppose the name is DAVID, I would like to mask it to FCXKF. You can see the character has been incremented by 2. Can this be done using COBOL ASCII character increment?
Thanks,
Hari |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Tue Jun 16, 2009 9:50 am Post subject: |
|
|
hari108,
What would y & z be replaced with? Assuming y and z translates to A & B you can use inspect to convert the string
Code: |
INSPECT INP-STR CONVERTING 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
TO 'CDEFGHIJKLMNOPQRSTUVWXYZAB'
|
Kolusu |
|
Back to top |
|
 |
|
|