Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
outlinh1. true
outlinh1. true
1printablefalse
2stylh1. none
3indent20px

Introduction 

The SQLPLUSJob JITL Job Template provides a standardized interface for executing Oracle® SQL*Plus scripts. The job template offers out-of-the-box capabilities

  • to execute an SQL*Plus script,
  • to pass arguments to an SQL*Plus script,
  • to collect results,
  • to pass results as Order Variables to the next jobjobs,
  • to use a JS7 - Credential Store

Usage

...

When defining the job consider

  • to invoke the Wizard that is available from the job properties tab in the Configuration view and to select the JITL job class and SQLExecutorJob and respective arguments from the Wizard

or

  • to specify the JITL job class and com.sos.jitl.jobs.db.oracle.SQLPLUSJobSQLPLUSJob Java class name, then add arguments as explained from the below documentation.

Example

Download: 

The following example shows basic use of the SQLPlusJob. It executes PL/SQL anonymous code blocks - selecting the current system date and writing it to stdout.


The job arguments can be specified as follows:

...

  • The command_script_file argument points to a file e.g. with the following SQL code:
    • WHENEVER SQLERROR EXIT SQL.SQLCODE
      WHENEVER OSERROR EXIT FAILURE
      SELECT 'SET business_date IS ' || TO_CHAR(SYSDATE,'dd.mm.yyyy DAY') FROM DUAL;

Arguments

Documentation

Job Documentation: https://wwwThe com.sos-berlin.com/doc/JS7-JITL/SQLPlusJob.xml

The SQLPlusJob .jitl.jobs.db.oracle.SQLPLUSJob class accepts the following arguments:

...

  • The exit_code will be 0 If the SQL*Plus script terminates successfully.
  • If std_err_output is not empty then the exit code will be set to the value 99.
  • If either SP2* or ORA-* errors occur then the exit code will be set to the value 98.

Further

...

Resources

...