DSSetParam basic function with an encrypted parameter

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Griffin07
Premium Member
Premium Member
Posts: 19
Joined: Tue Jul 17, 2007 6:55 am

DSSetParam basic function with an encrypted parameter

Post by Griffin07 »

Hi Folks, anyone know how to get the DSSetParam basic function to work to set an encrypted parameter. I have a generic job that I pass the DB name, logon and password to. The password is encrypted using a java routine so that it does not show up in any of the logs of files anywhere, I am then decrypting it in a routine and want to set the job parameters and run the job in the routine but the setting of the password keeps throwing the -4 error. The value I am passing to the DSSetParam is decrypted correctly to a basic string value.

thakns
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

... let's get you into your own post.

Done.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Griffin07
Premium Member
Premium Member
Posts: 19
Joined: Tue Jul 17, 2007 6:55 am

Post by Griffin07 »

thanks, hoping someone knows how I can get around this error. I am in v9.1
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Make sure that your encryption algorithm generates only printable characters. Decrypt in a routine invoked from a Routine activity, and pass the password parameter en clair into the Job activity. It will be displayed as a row of asterisks in the job log.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Griffin07
Premium Member
Premium Member
Posts: 19
Joined: Tue Jul 17, 2007 6:55 am

Post by Griffin07 »

Hi, the original encryption is doing just printable chars and the decryption java is being invoked thru the DSExecute command

javaExec = JavaCmd1 : " " : EncVal1
call DSExecute ('UNIX', javaExec, Src_DecryptedVal, retcode)

and I have verified that the value coming back in Src_DecryptedVal is the correct unencrypted value and then I am using the DSSetParam to set it

JobError = DSSetParam(hJob1, "DB_SRC_Password", Src_DecryptedVal)
Griffin07
Premium Member
Premium Member
Posts: 19
Joined: Tue Jul 17, 2007 6:55 am

Post by Griffin07 »

my friend, you were right, there was an @FM stuck in three and that messed me up, it is now working, thanks so much :)
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ah... seems like it's always those darn Field Marks when you see the -4. :(
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply