Author |
Message
|
shediiwork |
Posted: Mon Jul 18, 2005 9:36 am Post subject: Invalid Parser Seq Error from PCF Command |
|
|
Acolyte
Joined: 07 Jun 2005 Posts: 52
|
Could anyone help identify where this "Invalid Parser Sequence" error is coming from? I'm calling a procedure within esql to send a PCF command to a queue. The esql call uses two parameters and the third is inject.
<snip>
QUECONTROL('QL.IN.JX', 1 );
</snip>
CREATE PROCEDURE QUECONTROL (IN QNAME CHARACTER, IN FLAG INTEGER)
BEGIN
/*****************************
* Assembles PCF command to inhibit GET's from a queue.
*
*/
/* PCF header is following the MQMD header. */
SET OutputRoot.MQMD.MsgType = MQMT_REQUEST;
SET OutputRoot.MQMD.Format = MQFMT_ADMIN;
SET OutputRoot.MQMD.ReplyToQ = 'RESP.CONTROL';
SET OutputRoot.MQMD.MsgSeqNumber = 1;
/* Command is 'Change Queue: Inhibit GET from queue'. */
CREATE FIELD OutputRoot.MQPCF.MQPCF;
DECLARE refRequest REFERENCE TO OutputRoot.MQPCF.MQPCF;
SET refRequest.Type = MQCFT_COMMAND;
SET refRequest.StrucLength = MQCFH_STRUC_LENGTH;
SET refRequest.Version = MQCFH_CURRENT_VERSION;
SET refRequest.Command = MQCMD_CHANGE_Q;
SET refRequest.MsgSeqNumber = 1;
SET refRequest.Control = MQCFC_LAST;
SET refRequest.ParameterCount = 3;
/* First parameter: Queue Name. */
CREATE FIELD OutputRoot.MQPCF.MQCFST;
MOVE refRequest TO OutputRoot.MQPCF.MQCFST;
SET refRequest.Type = MQCFT_STRING;
SET refRequest.StrucLength = MQCFST_STRUC_LENGTH_FIXED + LENGTH(QNAME);
SET refRequest.Parameter = MQCA_Q_NAME;
SET refRequest.CodedCharSetId = 0;
SET refRequest.StringLength = LENGTH(QNAME);
SET refRequest.String = QNAME;
/* Second parameter: Queue Type. */
CREATE FIELD OutputRoot.MQPCF.MQCFIN;
MOVE refRequest TO OutputRoot.MQPCF.MQCFIN;
SET refRequest.Type = MQCFT_INTEGER;
SET refRequest.StrucLength = MQCFIN_STRUC_LENGTH;
SET refRequest.Parameter = MQIA_Q_TYPE;
SET refRequest.Value = MQQT_LOCAL;
/* Third parameter: Allow/Inhibit GET.*/
CREATE NEXTSIBLING OF refRequest NAME 'MQCFIN';
MOVE refRequest NEXTSIBLING;
SET refRequest.Type = MQCFT_INTEGER;
SET refRequest.StrucLength = MQCFIN_STRUC_LENGTH;
SET refRequest.Parameter = MQIA_INHIBIT_GET;
SET refRequest.Value = FLAG ;
END;
END MODULE;
TIA, Shed |
|
Back to top |
|
 |
wschutz |
Posted: Mon Jul 18, 2005 9:59 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Where are you getting the parser error? On the MQOutput node? Try putting a trace node before that and dumping the ${Root}. Perhaps your Root has some subtrees you weren't expecting (like a left over XML or MRM)..... _________________ -wayne |
|
Back to top |
|
 |
wschutz |
Posted: Mon Jul 18, 2005 10:49 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Also, should this:
Quote: |
/* Command is 'Change Queue: Inhibit GET from queue'. */
CREATE FIELD OutputRoot.MQPCF.MQPCF;
DECLARE refRequest REFERENCE TO OutputRoot.MQPCF.MQPCF;
|
Be:
Code: |
/* Command is 'Change Queue: Inhibit GET from queue'. */
CREATE FIELD OutputRoot.MQPCF.MQCFH;
DECLARE refRequest REFERENCE TO OutputRoot.MQPCF.MQCFH;
|
?? _________________ -wayne |
|
Back to top |
|
 |
shediiwork |
Posted: Mon Jul 18, 2005 11:18 am Post subject: |
|
|
Acolyte
Joined: 07 Jun 2005 Posts: 52
|
The parser error is coming from the MQOutput node. I don't see any left XML or MRM but there is some left over BLOB. Should I null this field?
Here's the output from the trace node.
(
(0x01000000):Properties = (
(0x03000000):MessageSet = ''
(0x03000000):MessageType = ''
(0x03000000):MessageFormat = ''
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 1208
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = TRUE
(0x03000000):CreationTime = GMTTIMESTAMP '2005-07-18 19:08:19.810'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 4
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
)
(0x01000000):MQMD = (
(0x03000000):SourceQueue = 'QL.BRKJX01.MPTSTP.DIFMS.MS650D02.IN.JX'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 437
(0x03000000):Format = 'MQHRF2'
(0x03000000):Version = 2
(0x03000000):Report = 0
(0x03000000):MsgType = 1
(0x03000000):Expiry = -1
(0x03000000):Feedback = 0
(0x03000000):Priority = 4
(0x03000000):Persistence = 1
(0x03000000):MsgId = X'414d5120514d4a37323042443120202016c6db422000100f'
(0x03000000):CorrelId = X'000000000000000000000000000000000000000000000000'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = 'FINANCIAL.RESP.CONTROL'
(0x03000000):ReplyToQMgr = 'QMJ720BD1 '
(0x03000000):UserIdentifier = 'wbrkuser '
(0x03000000):AccountingToken = X'160105150000005729024c78006d1f43170a32fd03000000000000000000000b'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 28
(0x03000000):PutApplName = 'Websphere MQ Client for Java'
(0x03000000):PutDate = DATE '2005-07-18'
(0x03000000):PutTime = GMTTIME '19:08:19.810'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)
(0x01000000):MQRFH2 = (
(0x03000000):Version = 2
(0x03000000):Format = 'MQSTR '
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 1208
(0x03000000):Flags = 0
(0x03000000):NameValueCCSID = 1208
(0x01000000):mcd = (
(0x01000000):Msd = (
(0x02000000): = 'none'
)
)
)
(0x01000000):BLOB = (
(0x03000000):BLOB = X'585858585858'
)
(0x01000000):MQPCF = (
(0x01000000):MQCFH = (
(0x03000000):Type = 1
(0x03000000):StrucLength = 36
(0x03000000):Version = 1
(0x03000000):Command = 8
(0x03000000):MsgSeqNumber = 1
(0x03000000):Control = 1
(0x03000000):ParameterCount = 3
)
(0x01000000):MQCFST = (
(0x03000000):Type = 4
(0x03000000):StrucLength = 58
(0x03000000):Parameter = 2016
(0x03000000):CodedCharSetId = 0
(0x03000000):StringLength = 38
(0x03000000):String = 'QL.IN.JX'
)
(0x01000000):MQCFIN = (
(0x03000000):Type = 3
(0x03000000):StrucLength = 16
(0x03000000):Parameter = 20
(0x03000000):Value = 1
)
(0x01000000):MQCFIN = (
(0x03000000):Type = 3
(0x03000000):StrucLength = 16
(0x03000000):Parameter = 9
(0x03000000):Value = 0
)
)
) |
|
Back to top |
|
 |
wschutz |
Posted: Mon Jul 18, 2005 11:24 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
I wouldn't think you'd want either the BLOB or the RFH2. Also, the MQMD.Format isn't MQADMIN! (nor does the ReplyToQW match your esql....) _________________ -wayne |
|
Back to top |
|
 |
shediiwork |
Posted: Mon Jul 18, 2005 12:12 pm Post subject: |
|
|
Acolyte
Joined: 07 Jun 2005 Posts: 52
|
Quote: |
Also, the MQMD.Format isn't MQADMIN!
|
I'm guessing that "SET OutputRoot.MQMD.Format = MQFMT_ADMIN;" is the reason so does it need to be set? |
|
Back to top |
|
 |
shediiwork |
Posted: Mon Jul 18, 2005 12:19 pm Post subject: |
|
|
Acolyte
Joined: 07 Jun 2005 Posts: 52
|
Also, without RFH2 I get a "failed to locate constant: RFH2 " error. |
|
Back to top |
|
 |
wschutz |
Posted: Mon Jul 18, 2005 2:40 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Actually, I have this (sort of) working:
Code: |
SET OutputRoot.MQMD.MsgType = MQMT_REQUEST;
SET OutputRoot.MQMD.Format = MQFMT_ADMIN;
SET OutputRoot.MQMD.ReplyToQ = 'RESP.CONTROL';
SET OutputRoot.MQMD.MsgSeqNumber = 1;
CREATE FIELD OutputRoot.MQPCF;
DECLARE refRequest REFERENCE TO OutputRoot.MQPCF;
SET refRequest.Type = MQCFT_COMMAND;
SET refRequest.StrucLength = MQCFH_STRUC_LENGTH;
SET refRequest.Version = MQCFH_CURRENT_VERSION;
SET refRequest.Command = MQCMD_CHANGE_Q;
SET refRequest.MsgSeqNumber = 1;
SET refRequest.Control = MQCFC_LAST;
SET refRequest.ParameterCount = 3;
SET refRequest.Parameter[1] = MQCA_Q_NAME;
SET refRequest.Parameter[1].* = 'TEST';
SET refRequest.Parameter[2] = MQIA_Q_TYPE;
SET refRequest.Parameter[2].* = MQQT_LOCAL;
SET refRequest.Parameter[3] = MQCA_Q_DESC;
SET refRequest.Parameter[3].* = 'hody partner'; |
As you see, its quite different than the original thought .... this code does create a valid PCF message, but the MQPCF parser insists on making the format MQPCF, which the command server doesn't like. I'll continue to hack this .... _________________ -wayne |
|
Back to top |
|
 |
wschutz |
Posted: Mon Jul 18, 2005 4:59 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Okay...here's the hack that makes it work
Code: |
CALL CopyMessageHeaders();
SET OutputRoot.MQMD.MsgType = MQMT_REQUEST;
SET OutputRoot.MQMD.Format = MQFMT_ADMIN;
SET OutputRoot.MQMD.ReplyToQ = 'RESP.CONTROL';
-- SET OutputRoot.MQMD.MsgSeqNumber = 1;
CREATE FIELD OutputRoot.MQPCF;
DECLARE refRequest REFERENCE TO OutputRoot.MQPCF;
SET refRequest.Type = MQCFT_COMMAND;
-- SET refRequest.StrucLength = MQCFH_STRUC_LENGTH;
-- SET refRequest.Version = MQCFH_CURRENT_VERSION;
SET refRequest.Command = MQCMD_CHANGE_Q;
-- SET refRequest.MsgSeqNumber = 1;
-- SET refRequest.Control = MQCFC_LAST;
-- SET refRequest.ParameterCount = 3;
SET refRequest.Parameter[1] = MQCA_Q_NAME;
SET refRequest.Parameter[1].* = 'TEST';
SET refRequest.Parameter[2] = MQIA_Q_TYPE;
SET refRequest.Parameter[2].* = MQQT_LOCAL;
SET refRequest.Parameter[3] = MQCA_Q_DESC;
SET refRequest.Parameter[3].* = 'The new description';
set OutputRoot.BLOB.BLOB = asbitstream(OutputRoot.MQPCF);
set OutputRoot.MQPCF = null;
SET OutputRoot.MQMD.Format = MQFMT_ADMIN;
|
The trick seems to be setting the format after the MQPCF parser is invoked, as invoking the parser seems to set the MQMD.FORMAT to 'MQPCF'. I've commented out the statements that don't seem to be necessary ... have fun  _________________ -wayne |
|
Back to top |
|
 |
shediiwork |
Posted: Tue Jul 19, 2005 7:50 am Post subject: |
|
|
Acolyte
Joined: 07 Jun 2005 Posts: 52
|
Wayne, I tried that and now I get an application event error indicating that the MQSTR.dll and MQHRF2.dll was not found.
Event Type: Information
Event Source: WebSphere MQ
Event Category: None
The library C:\Program Files\IBM\WebSphere MQ\exits\MQSTR.dll was not found. The queue manager will continue without this module.
The dynamically loadable file C:\Program Files\IBM\WebSphere MQ\exits\MQSTR.dll was not found.
Check that the file exists and is either fully qualified or is in the appropriate directory.
Here's my trace:
(
(0x01000000):Properties = (
(0x03000000):MessageSet = ''
(0x03000000):MessageType = ''
(0x03000000):MessageFormat = ''
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 1208
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = TRUE
(0x03000000):CreationTime = GMTTIMESTAMP '2005-07-19 15:29:22.210'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 4
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
)
(0x01000000):MQMD = (
(0x03000000):SourceQueue = 'QL.BRKJX01.MPTSTP.DIFMS.MS650D02.IN.JX'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 437
(0x03000000):Format = 'MQHRF2'
(0x03000000):Version = 2
(0x03000000):Report = 0
(0x03000000):MsgType = 1
(0x03000000):Expiry = -1
(0x03000000):Feedback = 0
(0x03000000):Priority = 4
(0x03000000):Persistence = 1
(0x03000000):MsgId = X'414d5120514d4a373230424431202020b212dd4220001609'
(0x03000000):CorrelId = X'000000000000000000000000000000000000000000000000'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = 'FINANCIAL.RESP.CONTROL'
(0x03000000):ReplyToQMgr = 'QMJ720BD1 '
(0x03000000):UserIdentifier = 'wbrkuser '
(0x03000000):AccountingToken = X'160105150000005729024c78006d1f43170a32fd03000000000000000000000b'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 28
(0x03000000):PutApplName = 'Websphere MQ Client for Java'
(0x03000000):PutDate = DATE '2005-07-19'
(0x03000000):PutTime = GMTTIME '15:29:22.210'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)
(0x01000000):MQRFH2 = (
(0x03000000):Version = 2
(0x03000000):Format = 'MQSTR '
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 1208
(0x03000000):Flags = 0
(0x03000000):NameValueCCSID = 1208
(0x01000000):mcd = (
(0x01000000):Msd = (
(0x02000000): = 'none'
)
)
)
(0x01000000):BLOB = (
(0x03000000):BLOB = X'010000002400000001000000080000000100000001000000000000000000000003000000040000003c000000e0070000b501000026000000514c2e42524b4a5830312e4d50545354502e4449464d532e4d533437354430312e494e2e4a580000030000001000000014000000010000000400000028000000dd070000b501000013000000546865206e6577206465736372697074696f6e00'
)
)
Shed. |
|
Back to top |
|
 |
wschutz |
Posted: Tue Jul 19, 2005 7:53 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
You need to null out the mqrfh2 header:
Code: |
.....
set OutputRoot.BLOB.BLOB = asbitstream(OutputRoot.MQPCF);
set OutputRoot.MQPCF = null;
set OutputRoot.MQRFH2 = null;
SET OutputRoot.MQMD.Format = MQFMT_ADMIN
|
_________________ -wayne |
|
Back to top |
|
 |
shediiwork |
Posted: Tue Jul 19, 2005 8:12 am Post subject: |
|
|
Acolyte
Joined: 07 Jun 2005 Posts: 52
|
That took care of the application error but no change was made and no msg send to the ReplyToQ. any ideas?
Also, where is the ref material for this stuff? The only thing I have here that helpful is the MQ Application Programming Reference. |
|
Back to top |
|
 |
wschutz |
Posted: Tue Jul 19, 2005 8:17 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Can you post the trace output from right before your MQOutput node.... and as far as documentation goes, I haven't found anything for the broker that explains anything about creating pcf messages..... _________________ -wayne |
|
Back to top |
|
 |
shediiwork |
Posted: Tue Jul 19, 2005 8:38 am Post subject: |
|
|
Acolyte
Joined: 07 Jun 2005 Posts: 52
|
ESQL:
CALL CopyMessageHeaders();
SET OutputRoot.MQMD.MsgType = MQMT_REQUEST;
SET OutputRoot.MQMD.Format = MQFMT_ADMIN;
SET OutputRoot.MQMD.ReplyToQ = 'FINANCIAL.RESP.CONTROL';
CREATE FIELD OutputRoot.MQPCF;
DECLARE refRequest REFERENCE TO OutputRoot.MQPCF;
SET refRequest.Type = MQCFT_COMMAND;
SET refRequest.Command = MQCMD_CHANGE_Q;
SET refRequest.Parameter[1] = MQCA_Q_NAME;
SET refRequest.Parameter[1].* = 'QL.BRKJX01.MPTSTP.DIFMS.MS475D01.IN.JX';
SET refRequest.Parameter[2] = MQIA_Q_TYPE;
SET refRequest.Parameter[2].* = MQQT_LOCAL;
SET refRequest.Parameter[3] = MQCA_Q_DESC;
SET refRequest.Parameter[3].* = 'The new description';
set OutputRoot.BLOB.BLOB = asbitstream(OutputRoot.MQPCF);
set OutputRoot.MQPCF = null;
set OutputRoot.MQRFH2 = null;
SET OutputRoot.MQMD.Format = MQFMT_ADMIN;
Trace:
(0x01000000):Properties = (
(0x03000000):MessageSet = ''
(0x03000000):MessageType = ''
(0x03000000):MessageFormat = ''
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 437
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = TRUE
(0x03000000):CreationTime = GMTTIMESTAMP '2005-07-19 16:33:02.870'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 4
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
)
(0x01000000):MQMD = (
(0x03000000):SourceQueue = 'QL.BRKJX01.MPTSTP.DIFMS.MS650D02.IN.JX'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 437
(0x03000000):Format = 'MQADMIN '
(0x03000000):Version = 2
(0x03000000):Report = 0
(0x03000000):MsgType = 1
(0x03000000):Expiry = -1
(0x03000000):Feedback = 0
(0x03000000):Priority = 4
(0x03000000):Persistence = 1
(0x03000000):MsgId = X'414d5120514d4a373230424431202020b212dd422000160d'
(0x03000000):CorrelId = X'000000000000000000000000000000000000000000000000'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = 'FINANCIAL.RESP.CONTROL'
(0x03000000):ReplyToQMgr = 'QMJ720BD1 '
(0x03000000):UserIdentifier = 'wbrkuser '
(0x03000000):AccountingToken = X'160105150000005729024c78006d1f43170a32fd03000000000000000000000b'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 28
(0x03000000):PutApplName = 'Websphere MQ Client for Java'
(0x03000000):PutDate = DATE '2005-07-19'
(0x03000000):PutTime = GMTTIME '16:33:02.870'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)
(0x01000000):BLOB = (
(0x03000000):BLOB = X'010000002400000001000000080000000100000001000000000000000000000003000000040000003c000000e0070000b501000026000000514c2e42524b4a5830312e4d50545354502e4449464d532e4d533437354430312e494e2e4a580000030000001000000014000000010000000400000028000000dd070000b501000013000000546865206e6577206465736372697074696f6e00'
)
) |
|
Back to top |
|
 |
wschutz |
Posted: Tue Jul 19, 2005 8:47 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
well, that looks good. stop the command server and use amqsbcg to dump the message and paste it here. also, I'm sure you've checked that the replytoQ actually exists and there are no messages in the mq error logs .... _________________ -wayne |
|
Back to top |
|
 |
|