You can create a command job to run a script to query what you need from the db and return the results to a variable.
Use that variable's value in the autosys sendevent command to set an autosys global variable.
And yes, jobs can then use that global variable as their starting condition.
--- sample script ---
c_ename=`/opt/oracle/instantclient_11_2/sqlplus -s SCOTT/[email protected]
<set pagesize 0 feedback off verify off heading off echo off
select ename from emp
where empno = 7566;
sendevent -E SET_GLOBAL -G USER1=$c_ename
The above connects to the db and queries a table to get the username and then sets the username as the value for USER1 (the autosys global variable).
You could then use that in a 2nd job's definition.
For more details on conditions see:
For more details on global variables see: