IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Stored Procedures for AUTO BIND


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shaik Madar vali

New User


Joined: 28 Apr 2005
Posts: 8

PostPosted: Thu Jun 22, 2006 4:38 pm
Reply with quote

Hi,

Is there anyway to REBIND a DB2 program thru Stored Procedures whenever -805 is occured while running a program?

If so, please let me know the approach.


Thanks in advance.
Back to top
View user's profile Send private message
anamikak

New User


Joined: 10 May 2006
Posts: 64
Location: Singapore

PostPosted: Sat Jun 24, 2006 12:23 am
Reply with quote

You can always include the Stored procedure package in your PKLIST of your application plan. The Stored procedure will execute on the same thread as your application plan.

Anamika
Back to top
View user's profile Send private message
shaik Madar vali

New User


Joined: 28 Apr 2005
Posts: 8

PostPosted: Mon Jun 26, 2006 11:31 am
Reply with quote

HI Anamika,

Thanks for your information. But i want to code a stored procedure to REBIND the existing package for the programe which has abended with -805.

EX: In my COBOL program i want to code like this.

EXEC SQL
SELECT COL1 INTO WS-COL1
FROM TAB1
WHERE COL1 = :LS-COL1
END-EXEC.

EVALUATE SQLCODE

WHEN +100
DISPLAY 'NO SUCH ROW EXIST'

WHEN -805
CALL "STPROC" USING WS-PGM-NAME

WHEN OTHERS
CALL "ERROR-RUTINE" USING ABEND-CODE

END-EVALUATE.

==========

CREATE OR REPLACE STORED PROCEDURE
( IN PROGRAM-NAME X(8) )

BEGIN
XXXXXXXXXXX ( help me in writing a REBIND Utility to bind the PROGRAM-NAME passed by the cobol program)
XXXXXXXXX
XXXXXXXXX

END.
Back to top
View user's profile Send private message
anamikak

New User


Joined: 10 May 2006
Posts: 64
Location: Singapore

PostPosted: Mon Jun 26, 2006 1:08 pm
Reply with quote

Simply rebinding the existing package will not help you resolve -805. I think that resolving -805 is a slightly eloborate process and it simply cannot be done by wiriting SQL procedure( which you have outlined).

In fact Tools like Platinum detector or BMC Apptune are available which take you step by step to resolve -805. Even if these tools are not supported in your installation, you have to query a series of Db2 catlog tables and then do a bind.

If you want to try writing a stored procedure, notwithstanding the elaborate processes that i mentioned above, you can try writing a REXX stored procedure instead of an SQL procedure.

Anamika
Back to top
View user's profile Send private message
shaik Madar vali

New User


Joined: 28 Apr 2005
Posts: 8

PostPosted: Mon Jun 26, 2006 2:12 pm
Reply with quote

Hi Anamika,

Thanks for the above information. And i am new to REXX stored Procedure. Can you please tell me the process in briefly or any documents on the same will be a great helpful to me.

Thanks in advance.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Invoke stored procedure via batch JCL. DB2 2
No new posts Infosphere Optim - unable to save Col... IBM Tools 0
No new posts Library member auto insert option TSO/ISPF 3
No new posts Calling COBOL DB2 program from a COBO... COBOL Programming 2
No new posts user exits in Column Map procedures IBM Tools 0
Search our Forums:

Back to Top