Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Stored Procedures for AUTO BIND

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Stored Procedures for AUTO BIND
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    Post subject:
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    Post subject: Re: Stored Procedures for AUTO BIND
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    Post subject:
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    Post subject: Stored Procedures for AUTO BIND
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Why myself doing Package Bind always ... Susanta DB2 5 Thu Mar 02, 2017 10:47 pm
No new posts Bind plan as a member to another bind... rexx77 DB2 0 Thu Feb 16, 2017 2:02 am
No new posts Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us