...
The JITL JobSchedulerPLSQLJob job provide an standardized and parameterized interface to execute Oracle PL/SQLs. The JobScheduler offers out of the box capability to execute PL/SQLs, pass parameters to the PL/SQL or retrive and pass on the results of a PL/SQL execution to next job step as JobScheduler Order parameter. The JobSchedulerPLSQLJob can be used to execute existing PL/SQL files just by referring them in the command parameter.
Simple Example
Following is simple example to demonstrate capabilities of the JITL JobSchedulerPLSQLJob.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
<job title="Execute PL/SQL procedure" order="yes">
<description >
<include file="jobs/JobSchedulerPLSQLJob.xml"/>
</description>
<params >
<param name="db_url" value="jdbc:oracle:thin:@:1521:DORCL01"/>
<param name="db_user" value="sos_scheduler"/>
<param name="db_password" value="sos"/>
<param name="command" value="
DECLARE
v_date DATE := SYSDATE;
BEGIN
SELECT SYSDATE
INTO v_date
FROM DUAL;
DBMS_OUTPUT.PUT_LINE(' +++ +++');
DBMS_OUTPUT.PUT_LINE('SET today_date IS '|| v_date);
DBMS_OUTPUT.PUT_LINE(' +++ +++');
END;
"/>
<param name="variable_parser_reg_expr" value="^SET\s+([^\s]+)\s*IS\s+(.*)$"/>
</params>
<script language="java" java_class="sos.scheduler.db.JobSchedulerPLSQLJobJSAdapterClass"/>
<run_time />
</job>
|
How is the PL/SQL script defined?
...