|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Get NexVal from sequence |
« View previous topic :: View next topic » |
Author |
Message
|
amkush |
Posted: Tue Dec 14, 2004 10:14 am Post subject: Get NexVal from sequence |
|
|
Newbie
Joined: 09 Dec 2004 Posts: 5
|
Hi All,
Stuck on retreving a new value from a sequence defined in the database. It doesn't seem to work. Trying to find the possible cause. The scenario is something like this,
Have defined a datasource along with the table name for the compute node in its property on the inputs tab. Cos, we don't intend to use any table in the database, have used a non-existing table. Is this okay?
Then, in the esql, do something like,
Code: |
SET OutputRoot.XML.Result.Data[] = PASSTHRU('SELECT NEXTVAL FOR MQSI1.SEQ1 FROM SYSIBM.SYSDUMMY1');
|
It gives an error message like,
Code: |
Error detected whilst processing a message in node 'TEST_DB.MQOutput2'. : BK_MQI_1.d6faa415-ed00-0000-0080-f610f7456947: /build/S210_P/src/DataFlowEngine/ImbMqOutputNode.cpp: 715: ImbMqOutputNode::evaluate: ComIbmMQOutputNode: 044974bd-0001-01000-0080-bb5b8cdd204a
|
Have tried, Data[1] as well as just Data. It gives an error message for all.
The datasource is a DB2 datasource and is also defined in the odbc.ini file.
Any suggestions? Much appreciated. Thanks,
Amit |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Dec 14, 2004 10:17 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
There have to be more error messages. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kirani |
Posted: Tue Dec 14, 2004 11:25 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Please post your complete exceptionList. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
amkush |
Posted: Wed Dec 15, 2004 7:55 am Post subject: |
|
|
Newbie
Joined: 09 Dec 2004 Posts: 5
|
Hi,
Sorry for not posting the entire stack trace. We managed to sort out that error. Just an update, if it helps others.
The sequence was being executed (incremented in the database) when we gave something like,
Code: |
PASSTHRU('SELECT NEXTVAL FOR MQSI1.TSTSEQ FROM SYSIBM.SYSDUMMY1');
|
So, there was no problems in connecting to the database and incrementing the sequence. It was only the assignment which was causing the problem and it gave an error on constructing the message in the output queue. The problem had to do with, it constructing an output xml as,
Code: |
(0x1000010)XML = (
(0x1000000)Result = (
(0x1000000)Data = (
(0x1000000)1 = (
(0x2000000) = 48
)
)
)
)
|
And it gave an error message at the end of the stack trace as,
Code: |
Dec 15 15:32:05 bsrs6devj WMQIv210[75580]: (BK_MQI_1.default)[16715]BIP5008E: Invalid element name '1'. : BK_MQI_1.d6faa415-ed00-0000-0080-f610f7456947: /build/S210_P/src/MTI/MTIforBroker/GenXmlParser2/XmlImbParser.cpp: 605: XmlImbParser::validateElement: :
|
So we tried putting an alias name for the nextval in the select, and assiging it to Data[], like,
Code: |
SET OutputRoot.XML.Result.Data[] = PASSTHRU('SELECT NEXTVAL FOR MQSI.TSTSEQ AS UNIQUENO FROM SYSIBM.SYSDUMMY1');
|
and it works okay. But, thanks for your quick help on this.
Regards,
Amit |
|
Back to top |
|
 |
prasadpav |
Posted: Tue Jan 11, 2005 8:54 am Post subject: |
|
|
 Centurion
Joined: 03 Oct 2004 Posts: 142
|
Hi,
Don't know whether or not it is too late for you. The way the nextval works using sequence objects is:
>>db2 "values(nextval for schema.seqobj)"
So, in your message broker code also, if you just mention the following, probably it would work:
PASSTHRU('values(nextval for schema.seqobj)');
--Prasad |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|