Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2003
    Posts
    38

    Post Unanswered: Scheduling job using script(batch file)

    Hi,

    Can any one please tell me how to invoke db2 job scheduler (task center) using scripts .We need to schedule the jobs using script file. I can configure the DAS server and create tools catalog using the script but how do I set other parameter required for scheduling and then invoking it. I have to do all of these steps using a batch file.

    Thanks.

    Raj
    Raj Shekhar

  2. #2
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,

    Why do you need to have a batch file, if you can let control to db2?

    Grofaty

  3. #3
    Join Date
    Jun 2003
    Posts
    38
    Originally posted by grofaty
    Hi,

    Why do you need to have a batch file, if you can let control to db2?

    Grofaty
    Actually we needd to give the script file to client which could schedule the job rather than manually setting up the scheduler configuration
    Raj Shekhar

  4. #4
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,

    If you need just to execute SQL statements against database, you need to write the the sql statements to the txt file and then execute it.

    SQL statements separeted with ; charater:
    Code:
    connect to sample;
    insert into tab1 values (1,1);
    connect reset;
    Save the above SQLs (your SQLs) to text file sample.sql to c: (on Windows). Then execute the script with command:
    Code:
    db2 -tvf c:\sample.sql
    You need to have "DB2 Run-time client" installed on client PC.

    Hope this helps,
    Grofaty
    Last edited by grofaty; 09-04-03 at 05:51.

  5. #5
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: Scheduling job using script(batch file)

    Raj ... May be I'm totally wrong ...

    As the tools catalog database holds all information about jobs, why is it not possible to copy the records to this table to another ... Won't that mean the scripts are configured to run as per the required schedule ?


    Cheers
    Sathyaram

    Originally posted by Raj Shekhar
    Hi,

    Can any one please tell me how to invoke db2 job scheduler (task center) using scripts .We need to schedule the jobs using script file. I can configure the DAS server and create tools catalog using the script but how do I set other parameter required for scheduling and then invoking it. I have to do all of these steps using a batch file.

    Thanks.

    Raj
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •