Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2004
    Location
    India
    Posts
    135

    Unanswered: execute MULTIPLE PROCEDURE in a DB2 File

    Hi all,

    I have multiple DB2 Procedure in a file. I want to execute in a single shot ! guide me to do.

    Thanx in advance

  2. #2
    Join Date
    Sep 2003
    Posts
    218
    Let's take an example:

    create procedure p1 ()
    ...
    ...
    END!
    call p1!

    create procedure p2 ()
    ...
    ...
    END!
    call p2!
    terminate!

    etc

    save this into a test.clp file. and this can be executed in a *single shot* using > db2 -td! -v -ftest.clp. This should do the trick.

    check this out.. for more details

    http://www-106.ibm.com/developerwork...306haungs.html

    Hope this helps.

  3. #3
    Join Date
    Jan 2004
    Posts
    30
    Is it that, we have to use "!" as delimiter or else we can use any Special Chr's? Please specify those special chr's..
    Thanks


    Originally posted by dr_suresh20
    Let's take an example:

    create procedure p1 ()
    ...
    ...
    END!
    call p1!

    create procedure p2 ()
    ...
    ...
    END!
    call p2!
    terminate!

    etc

    save this into a test.clp file. and this can be executed in a *single shot* using > db2 -td! -v -ftest.clp. This should do the trick.

    check this out.. for more details

    http://www-106.ibm.com/developerwork...306haungs.html

    Hope this helps.

  4. #4
    Join Date
    Feb 2004
    Location
    India
    Posts
    135
    Hi

    yes. you can user instead of < ! > like @ ... and so on.

  5. #5
    Join Date
    Jan 2004
    Posts
    30
    Can u please specify those special characters................
    Thanks


    Originally posted by Saravanan.R
    Hi

    yes. you can user instead of < ! > like @ ... and so on.

  6. #6
    Join Date
    Sep 2003
    Posts
    218
    I think Saravanan has already answered it.. we can use special characters like "@" etc. I chose to use "!" in my example... For a comprehensive list, you may check out application development guide or redbooks or forums etc.

    HTH.

Posting Permissions

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