Page 1 of 1

How to encrypt and decrypt a file in datastage

Posted: Thu Feb 09, 2012 11:53 pm
by partha.natta
I need to decrypt some files in datastage which are coming as encrypted from the source system and also after generation of new files and sending them to other location I need to encrypt them again and then need to send. Can anyone help me how can I achieve it in datastage in windows environment.

Posted: Fri Feb 10, 2012 12:53 am
by kandyshandy
Partha, you said your input from source system is encrypted. If you want to decrypt them, you need the encryption/decryption software(/code) used by the source system. Once you have access to it, you can try to execute the same from DataStage to decrypt and encrypt whenever needed.

For e.g., if the encryption/decryption code is java based, then you can execute (call) the same in DataStage using Java stages and achieve what you want.

Posted: Fri Feb 10, 2012 1:12 am
by partha.natta
Could you please provide the detail information regarding this?
We are using windows platform and to achieve it what are the steps we need to follow, once we install the software what stage we need to use to develop the same.

Posted: Fri Feb 10, 2012 1:35 am
by pandeesh
Partha,
Please tell, how the source file has been encrypted.
Using which alogorithm ?
Unless that's revealed, we can't proceed for decryption.

Posted: Fri Feb 10, 2012 1:54 am
by ray.wurlod
pandeesh wrote:Partha,
Please tell, how the source file has been encrypted.
Using which alogorithm ?
Unless that's revealed, we can't proceed for decryption.
Of course we can! The answer is "with the same software".

Posted: Fri Feb 10, 2012 12:32 pm
by qt_ky
Partha, Kandy has given you the complete answer already. You have not yet given sufficient details in order for anyone to provide you with a more detailed resolution.

Posted: Mon Feb 13, 2012 1:42 am
by partha.natta
The requirement is like this. We shall receive files from different source systems as encrypted (key protected). It can be multiple files combined in a single encrypted folder or individually encrypted file. We need to decrypt them (file and folder both in our environment through datastage and then do all kind of transformation to generate the output file.
Once we generate the output file we need to encrypt them before sending them to other location. So how can we implement the same in datastage.

Posted: Mon Feb 13, 2012 2:26 am
by ray.wurlod
Why "through datastage"?

Who's idea was that?

Posted: Mon Feb 13, 2012 2:48 am
by pandeesh
You can , in a before/after job subroutine using ExecDOS by calling a batch script.
In the batch script you need to implement all those decryption mechanisms.

Posted: Mon Feb 13, 2012 2:51 am
by kandyshandy
Partha, is this an ACTUAL requirement or evaluation of tool or doing any POC?

Posted: Mon Feb 13, 2012 3:30 pm
by ray.wurlod
None of that helps really. The new feature is really about enabling you to encrypt passwords for use on command lines or in authentication files.

Posted: Mon Feb 13, 2012 9:36 pm
by qt_ky
You have many possible options but still only you have access to the information that is key to answering your question, such as the name of the encryption software and the exe file you would call from DataStage to use it.