Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us