Encrypt Data

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
vardhan354
Participant
Posts: 76
Joined: Wed Jan 25, 2006 6:42 pm

Encrypt Data

Post by vardhan354 »

Guyz,

I need to encrypt the data coming from source(Database table) and load in to another Database table. The data is 'SSN'.The source has all the 9 digits displayed.The transformation is, I need to mask the first 5 digits and display the last four only....any advices.......


Thanks,
ETL
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Re: Encrypt Data

Post by gateleys »

Unless you decide to write Basic code for AES, DES or the like, I would suggest you look at the possibility of calling these written as functions in languages like C/C++. You should find FIP compliant codes for the same in different languages. However, I don't know if they still have certain rules on some cryptographic codes if they are to be used outside of the USA.
gateleys
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Mask <> encrypt. If all you need to do is mask the first five digits so it looks something like this:

***-**-1234

Then just substring off the last four digits and concatenate that with the 'mask' for the first 5. Just don't expect to be able to 'unmask' it later. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can easily mask with the Fmt() function.

Code: Select all

Fmt(InLink.SSN, "9R***-**-####")
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can easily mask with the Fmt() function.

Code: Select all

Fmt(InLink.SSN, "9R***-**-####")
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vardhan354
Participant
Posts: 76
Joined: Wed Jan 25, 2006 6:42 pm

Post by vardhan354 »

I could achieve this by

'*****':Right (InLink.SSN, 4)

Once again, my thanks to all gurus........
ETL
Post Reply