This time with a Before-Job Subroutine.
I customized some code found in this forum to access an Oracle table from my routine, this is an excerpt of the code:
Code: Select all
Stmt= "select max(":field:") from ":table: " ;"
Call DSLogInfo("Query SQL: " : Stmt, "ExecSQLProc")
ErrCode1 = SQLBindCol(hStmt, 1, SQL.B.DEFAULT, res1)
status = SQLExecDirect(hStmt, Stmt)
I intensely searched the forum for some solution before I posted this but only found workarounds for similar situations involving job sequences, which is not my case.
I tried with environment variables without success.
P.D. Want to thank you for the sample code regarding SQLExecDirect and ODBC usage, good job!