Unix Technical Forum

DB2 CAF DISCONNECT and re-CONNECT

This is a discussion on DB2 CAF DISCONNECT and re-CONNECT within the DB2 forums, part of the Database Server Software category; --> Hi, According to Application Programming and SQL Guide chapter 29: "If DB2 terminates, a task that issued CONNECT must ...


Go Back   Unix Technical Forum > Database Server Software > DB2

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-26-2008, 03:55 PM
Amir
 
Posts: n/a
Default DB2 CAF DISCONNECT and re-CONNECT

Hi,

According to Application Programming and SQL Guide chapter 29:

"If DB2 terminates, a task that issued CONNECT must issue DISCONNECT
to reset the CAF control blocks. The function returns the reset
accomplished return codes
and reason codes (+004 and X'00C10824'), and ensures that future
connection requests from the task work when DB2 is back on line."

My CAF batch application issues CONNECT and works fine.
When STOP DB2 command is entered, my tecb (terminate ecb) is posted,
and I do a DISCONNECT.
Instead of the above retcode & reason code (4 & 824) I get a retcode=0
& reason code=0.
When checking with DISPLAY THREAD(*) I see my application's connection
to DB2 is still active.

Is it a bug of DB2 or am I doing something wrong?

I have also noticed that in the code example, at the end of chapter
29, when QUIESCE mode is found, nothing is done!?
It looks like a wrong behavior.
I thought that when STOP DB2 command is set, my CAF application should
DISCONNECT, to allow DB2 termination to be completed.
Then, when DB2 is up again, I shall do CONNECT again.

Please advise.
Avner
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:12 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com