View previous topic :: View next topic
|
Author |
Message |
revdpoel
New User
Joined: 01 Nov 2006 Posts: 56
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
|