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
DSSetParam basic function with an encrypted parameter
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
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)
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)