ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Some Prob. in 2-phase commit (C++, DB2, Win2000)

Post new topic  Reply to topic
 Some Prob. in 2-phase commit (C++, DB2, Win2000) « View previous topic :: View next topic » 
Author Message
rax
PostPosted: Wed Mar 10, 2004 7:15 pm    Post subject: Some Prob. in 2-phase commit (C++, DB2, Win2000) Reply with quote

Novice

Joined: 23 Feb 2004
Posts: 22

Hi,
I need to implement two-phase commit in c/c++ and DB2 on Win2000 with MQSeries as a transaction coordinator in my educational project. So, I started with the samples provided with the MQSeries. I precompiled that amqsxas0.sqc with the db2 precompiler and then along with other files I compiled by the Visual C++ compiler. I created the environment to run this program but in vain. Each time i run the program it gives the following errors. I used amqsput.exe, provided with the MQ to send a msg to the queue.

When i run the program, it behaves like this
J:\Program Files\IBM\WebSphere MQ\Tools\c\Samples\xatm\db2>amqsxas0 singDBQ singDBQM
Target queue is singDBQ
Unit of work started
---- error report -----------------------------
application message = OPEN CURSOR
line = 393
file = AMQSXAS0.SQC
SQLCODE = -998
SQL0998N Error occurred during transaction or heuristic processing. Reason
Code = "9". Subcode = "2". SQLSTATE=58005
SQLSTATE 58005: A system error (that prevents the successful execution of
subsequent SQL statements) occurred.
---- end error report ------------------------
MQBACK successfully issued

Following have been defined in the various files.
#define SQL_RC_E998 -998 /* General XA error */(From sqlcodes.h)
#define SQL_SYSERR_ERR_STOP "58005" (From sqlstate.h)
#define MQCRC_TRANSID_NOT_AVAILABLE 9 (from cmqc.h)

I have sent the following msg to the queue
J:\Program Files\IBM\WebSphere MQ\Tools\c\Samples\xatm\db2>amqsput singDBQ singDBQM
Sample AMQSPUT0 start
target queue is singDBQ
UPDATE Balance change=50 WHERE Account=1
Sample AMQSPUT0 end

Status of the queue after 1st back out
J:\Program Files\IBM\WebSphere MQ\Tools\c\Samples\xatm\db2>amqsbcg singDBQ singDBQM
AMQSBCG0 - starts here
**********************
MQOPEN - 'singDBQ'

MQGET of message number 1
****Message descriptor****
StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 546 CodedCharSetId : 437
Format : 'MQSTR '
Priority : 0 Persistence : 1
MsgId : X'414D512073696E674442514D20202020A44E4B4020000601'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 1
ReplyToQ : ' '
ReplyToQMgr : 'singDBQM '
** Identity Context
UserIdentifier : 'Administrato'
AccountingToken :
X'16010515000000FD43461E1851496407E53B2BF401000000000000000000000B'
ApplIdentityData : ' '
** Origin Context
PutApplType : '11'
PutApplName : 'WebSphere MQ\bin\amqsput.exe'
PutDate : '20040307' PutTime : '17184243'
ApplOriginData : ' '
GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'
**** Message ****
length - 40 bytes
00000000: 5550 4441 5445 2042 616C 616E 6365 2063 'UPDATE Balance c'
00000010: 6861 6E67 653D 3530 2057 4845 5245 2041 'hange=50 WHERE A'
00000020: 6363 6F75 6E74 3D31 'ccount=1 '

No more messages
MQCLOSE
MQDISC

Plz help me.
with regards
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
bower5932
PostPosted: Thu Mar 11, 2004 6:22 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

For starters, I'd suggest that you append to the General Support forum. You'll get more responses there.

Also, look through the System Administration manual. There are some obscure changes that need to be made (eg, tp_mon_name) that you may have left out.

Double-check the startup of your qmgr to make sure there aren't any funny errors in the logs.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Michael Dag
PostPosted: Thu Mar 11, 2004 6:57 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

Moved to General Support
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Some Prob. in 2-phase commit (C++, DB2, Win2000)
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.