• User's guide
  • API
Search Results for

    Show / Hide Table of Contents
    • Concepts
    • Installation
    • Configuration
      • Overview
      • License
      • Datasources
      • Configuration
      • Plug-Ins
      • Codepages
      • Environment Variables
      • Include files
      • Example
    • Jobs
      • Jobs
      • Include
      • Multi-Threaded Jobs
      • Tracking Jobs
    • Tasks
      • Overview
      • Copy Check
      • Excel
      • File Compare
      • File Copy
      • File Dump
      • File Edit
      • File Format
      • Foreach
      • Generate
      • IMS/DB Data Conversion
      • JCL Submit
      • Listcat
      • Log
      • Powershell
      • Set Environment Variable
      • Sql
      • Stored Procedure Compare
      • Table Compare
      • Table Copy
      • Table Load
      • Table Scan
      • Table Unload
      • User Script
    • Layouts
      • Overview
      • XML Definition
      • COBOL Definition
      • Field data Types
    • Extensibility
      • Extending Ianus
      • Column Comparators
      • Column Converters
      • Record Comparators
      • File Editors
      • User Script
      • Record Layout Match Class
      • Column Layout Match Class
      • User Fields
      • Codepages
      • Resources
    • Usage
      • Command Line
      • Monitors
      • Programmatically
      • Unit Testing
    • Known Issues
    • Disclaimers

    Sql

    The Sql task (sql) allows user to execute SQL commands and scripts against a specific database. The SQL script is included in the task XML.

    Attribute Type Purpose
    db string Database where the SQL script is run

    Example

    <job multithread="false">
      <sql name="SQL01" db="QS">
        drop table xls01;
        drop table xls02;
        create table xls01 (i1 int, c1 char(80), primary key(i1));
        create table xls02 (i1 int, c1 char(80), c2 char(80) primary key(i1));
      </sql>
    
      <setenv name="OTHERVAR">ANOTHER USER</setenv>
    
      <sql name="SQL02" db="QS">
        insert into xls01 values (1, 'I AM %USERNAME%');
        insert into xls01 values (2, 'YOU ARE %FAVAZZA%');
      </sql>
    </job>
    

    Status codes

    Status Status code Description
    Ready -1 Task is initialized, but not yet started
    Running -2 Task is running
    Success 0 Task completed successfully
    Warnings 1 Task completed with warnings
    Errors 2 Task completed with errors
    Aborted 9 Task cannot be executed
    In This Article
    Back to top Copyright 2021 - Hewlett-Packard Enterprise