MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Character masking using COBOL?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
hari108
Beginner


Joined: 03 Feb 2006
Posts: 16
Topics: 4

PostPosted: Tue Jun 16, 2009 4:39 am    Post subject: Character masking using COBOL? Reply with quote

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
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Jun 16, 2009 9:50 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group