Can I invoke a rebind from within a program

Larry Kirkpatrick

Can I invoke a rebind from within a program
I realize that one way of running a rebind from within a program is to call a variant of the DSNTBIND stored procedure (DSNTBIND is created to do binds but can easily be changed to do rebinds). However, I would like to do this without the use of a stored procedure. I am attempting to put together what I would call an "expendable rebind". If the rebind is causing contention issues (which it sometime does), I would like to cancel the rebind. If the rebind is running from a stored procedure (like DSNTBIND), the cancel of it causes issues with the stored procedure address space.

So, basically, I would like to perform a rebind from within a program. Can this be done in assembler? Can it be done in REXX? If it can, could you give me a code fragment to get me started?

Thanks.

Larry

_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* If you are going to attend only one conference this year, this is it! *
** The best DB2 technical sessions in the world
** Independent, not-for-profit, User Run - the IDUG difference!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's Listserv

Adam Baldwin

Re: Can I invoke a rebind from within a program
(in response to Larry Kirkpatrick)
Hi Larry. If the need to run the rebinds from within a program is only to enable cancelling the process in the case of contention, couldn't you achieve this be generating/ running your rebinds in a standard job? Are there specific reasons why you need to rebind from within a program?

Regards, Adam

_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* Your only source for independent, unbiased, and trusted DB2 information. *
** DB2 certification -> no additional charge
** Meet fellow DB2 users and leading DB2 consultants
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's Listserv

Larry Kirkpatrick

Re: Can I invoke a rebind from within a program
(in response to Adam Baldwin)
After the current bind is cancelled, I want the remainder to run.

Larry

_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* Your only source for independent, unbiased, and trusted DB2 information. *
** DB2 certification -> no additional charge
** Meet fellow DB2 users and leading DB2 consultants
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's Listserv

Wayne Driscoll

Re: Can I invoke a rebind from within a program
(in response to Larry Kirkpatrick)
One solution (is easiest to manage if you don't allow duplicate named
batch jobs to run concurrently) would be to create a large number of
single step jobs, all with the same jobname, with each step running one
bind. That way one job is cancelled due to contention, the next one will
start up.

=======================
Wayne Driscoll
OMEGAMON DB2 L3 Support/Development
wdrisco(AT)us.ibm.com
=======================



From:
Larry <[login to unmask email]>
To:
[login to unmask email]
Date:
11/19/2010 12:39 PM
Subject:
Re: [DB2-L] Can I invoke a rebind from within a program
Sent by:
IDUG DB2-L <[login to unmask email]>



After the current bind is cancelled, I want the remainder to run.

Larry

_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 *
http://IDUG.ORG/NA *
* Your only source for independent, unbiased, and trusted DB2
information. *
** DB2 certification -> no additional charge
** Meet fellow DB2 users and leading DB2 consultants
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is
the home of IDUG's Listserv



_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* Your only source for independent, unbiased, and trusted DB2 information. *
** DB2 certification -> no additional charge
** Meet fellow DB2 users and leading DB2 consultants
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's Listserv