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 Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am


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