How to use Password Encryption in a Promptset

Document ID : KB000088324
Last Modified Date : 24/01/2019
Show Technical Document Details
Issue:
How to use Password Encryption in a Promptset in Unix and Windows jobs.

Investigation

A Password defined in a Promptset is automatically encrypted and decrypted by the job at runtime.

The password is displayed as encrypted in the job report.

Resolution:
  1. Create a Prompset.
  2. Add a Text Box and check the 'Password' parameter.
  3. The Password typed into the Default and shown will now be displayed with '*'
  4. Define the Promptset for your object.
  5. Use the Variablename defined in your PromptSet as needed in the object.
Additional Information:
Use the &UC_JOBMD system variable with the CMD parameter.

In the Linux job, use the Promptset.  Then in the Process tab, the script will be something like this:

Example: 
&UC_JOBMD CMD="sqlplus uc4/&PASSWORD#@autodev @query.sql" 

where query.sql will contain the SQL query: 
select count (*) from user_tables; 

Example (query.sql): 
select count(*) from oh where oh_client=100; 

On the server, this can be tested like so:
sqlplus automic/<passwordhere>@pdbawa @sql.sql 

Alternatively, a SQL agent and SQL job can be used instead.  Use a CONN object to store the credentials or connect directly to the DB then put the query in the Process tab.