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
 

 

DATA MASKING

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
View previous topic :: :: View next topic  
Author Message
beruoist

New User


Joined: 14 Nov 2007
Posts: 70
Location: mumbai

PostPosted: Wed Dec 17, 2008 2:08 pm    Post subject: DATA MASKING
Reply with quote

I have a alphanumeric variable which can contain values like below

#X= "ASCBDADJK 903485"

what i have to do is examine the variable and replace all the A-Z to X and 0-9 to 9..rest of the spaces and other characters should be unchanged.

I had thought of one logic.

#I (N2)
#J (N2)
#VAR (A1/1:26) CONST<'A''B''C''D''E''F''G''H''I''J''K''L''M''N''O''P''Q''R''S''T''U''V''W''X''Y''Z'>
#NUM (N1/10) CONST <'1''2''3''4''5''6''7''8''9''0'>
*
*
For #I 1 26
EXAMINE #X for #VAR(#I) replace with 'X'
#I=#I+1
end-for
*
For #J 1 10
EXAMINE #X for #NUM(#J) replace with '9'
#J=#J+1
end-for
*
*

Note- I havent tested this logic yet,Hope this will work fine.

My question is,Is thier is any easier way to do this ?
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Dec 17, 2008 3:30 pm    Post subject:
Reply with quote

There is no other option. In order for your statements to work as expected, change "replace" to "replace all".

O.
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 -> Java & MQSeries All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am


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