For this example, I'm using the sqlldr command.
Linux:
cd sqlldr
PASS=`&UC_JOBMD CMD="echo &SQLPASS#"`;export PASS
sqlldr &SQLLOG#/$PASS@<server> control=control.ctl log=delimited.log data=delimited.dat
Windows (Agent set up as PowerShell Interpreter):
set ORACLE_SID=orcl
cd C:\AUTOMIC\Agents\windows_powershell\bin
&UC_JOBMD CMD="sqlldr &SQLLOG#/&SQLPASS# control=control.ctl log=delimited.log data=delimited.dat"
Windows (non-PowerShell, it writes the info to a temp file):
! Only had to do the following set if I did this in the preprocess tab. Not necessary in the process tab.
:set &UC_JOBMD = get_var(UC_EX_JOB_MD)
&UC_JOBMD CMD=">env&$RUNID#.bat echo set db_password=&DB_PASSWORD"
@echo off
call env&$RUNID#.bat
del env&$RUNID#.bat
@echo on
sqlplus automic/%db_password%@ORCL@test.sql
Windows (not setting SID):
:set &UC_JOBMD = get_var(UC_EX_JOB_MD)
&UC_JOBMD CMD=echo &DB_PASSWORD | tee -variable db_password
sqlplus uc4/${db_password}@ORCL@test.sql