IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

Anonimizing, depersonalizing data


 
IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
revdpoel

New User


Joined: 01 Nov 2006
Posts: 56

PostPosted: Tue Mar 18, 2014 1:59 am
Reply with quote

Hai

I am having a dataset with account numbers and information about the accounts. Each account number can appear multiple times. They should be anonimized in such a way that every time a certain account number gets the same value. So, if account number 0912345678 appears 5 times it should for instance have five times the value gr762389qw (just an example)

I am looking for an example Cobol program.

Does somebody has that?

thnx
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2502
Location: NY,USA

PostPosted: Tue Mar 18, 2014 4:05 am
Reply with quote

Hello,

Would you like the account numbers to be masked or need a mock file which doesn't contain any actual but mok up data in TEST env.?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8568
Location: Dubuque, Iowa, USA

PostPosted: Tue Mar 18, 2014 4:43 am
Reply with quote

Is the data set sorted by the account number? If so, the logic is pretty simple -- read the first record, assign the replacement value, write to output, then loop reading next record, checking to see if it matches the previous account number and if so using the same replacement value (if not, assign a new one), and writing.

If the data set is not sorted by account number, you will need to build a table in your COBOL program of old account number and replacement value, and your logic will be read a record, look in the table to see if account number is already there (if not, add it and assign the replacement value) and use the replacement value, write the record. You will also need to have logic to detect if your table fills up, and depending upon the number of values you are replacing, you might find this approach to take a LOT of time.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Tue Mar 18, 2014 8:05 pm
Reply with quote

how are you masking (changing) the account number?

if INSPECT CONVERTING,
then refer to this
and then use it continuously.

then you do not have to worry about sorting or maintaining a table.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> COBOL Programming
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts How to find which file contains my se... DFSORT/ICETOOL 6
No new posts Changing Data Type SYNCSORT 4
No new posts Copying data from prev record using SORT SYNCSORT 19
No new posts how to get total count from numeric d... SYNCSORT 9
No new posts Map a data element to SPACES if it is 0 COBOL Programming 2

Back to Top