Discussion:
Cannot get MQMD inserted using ESQL
AkBar Dar
2013-10-09 16:18:18 UTC
Permalink
I am trying to copy MsgId to CorreId, but , things are not looking up. Fields are being created, but, it's not created in the MQ Header. MQMD has the same MsgId, but, CorreId is 0000000. Below is how Queue content look like and ESQL is also included. Please advise:

Queue Content from RFHUTIL

<NS1:SapZisuHvcaTroubleTicket xmlns:NS1="http://www.ibm.com/xmlns/prod/websphere/j2ca/sap/sapzisuhvcatroubleticket">
<SAPTransactionID>0ADA1FA20100525579085B52</SAPTransactionID>
</NS1:SapZisuHvcaTroubleTicket>
<MQMD>
<MsgId>414d5120555549444130312020202020524f3e4420076757</MsgId>
<CorrelId>414d5120555549444130312020202020524f3e4420076757</CorrelId>
</MQMD>

ESQL is as followed:

CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
CALL CopyEntireMessage();
create field OutputRoot.XMLNSC.MQMD;
declare MQHeader reference to OutputRoot.XMLNSC.MQMD;
SET MQHeader.MsgId = InputLocalEnvironment.WrittenDestination.MQ.DestinationData.msgId;
SET MQHeader.CorrelId = InputLocalEnvironment.WrittenDestination.MQ.DestinationData.msgId;
RETURN TRUE;
END;


Regards,
AkBar Dar

Telecommute Day: Wednesday

Disclaimer This e-mail, and any attached file(s), is intended solely for the use of the individual or entity to whom this e-mail is addressed and may contain information that is privileged, confidential or exempt from disclosure. If you are not one of the named recipient(s) or otherwise have reason to believe that you have received this message in error, please notify the sender or call UI at 203-499-2222 and delete this message immediately from any computer. Any other use, retention, dissemination, retransmission, printing or copying of this e-mail or its contents (including any attached files) is strictly prohibited.

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
AkBar Dar
2013-10-11 13:58:52 UTC
Permalink
Solved;

I did the ESQL and then I able to create and modify the MQMD. ESQL is as followed:

CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
-- set Environment.Variables.errorSource = 'HCVtoSAP:SAPHCV_BrokerToSAPFlow_UpdateOutage';
-- declare EV reference to Environment.Variables;
CALL CopyMessageHeaders();
CALL CopyEntireMessage();
IF FIELDTYPE(OutputRoot.MQMD) IS NULL THEN
CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN 'MQMD';
SET OutputRoot.MQMD.Format = 'MQSTR ';
SET OutputRoot.MQMD.MsgId = InputLocalEnvironment.WrittenDestination.MQ.DestinationData.msgId;
SET OutputRoot.MQMD.CorrelId = InputLocalEnvironment.WrittenDestination.MQ.DestinationData.msgId;
ELSE
SET OutputRoot.MQMD = InputRoot.MQMD;
SET OutputRoot.MQMD.Format = 'MQSTR ';
SET OutputRoot.MQMD.CorrelId = OutputRoot.MQMD.MsgId;
END IF;
RETURN TRUE;
END;


Regards,
AkBar Dar

Telecommute Day: Wednesday

From: AkBar Dar
Sent: Wednesday, October 09, 2013 12:18 PM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Cannot get MQMD inserted using ESQL

I am trying to copy MsgId to CorreId, but , things are not looking up. Fields are being created, but, it's not created in the MQ Header. MQMD has the same MsgId, but, CorreId is 0000000. Below is how Queue content look like and ESQL is also included. Please advise:

Queue Content from RFHUTIL

<NS1:SapZisuHvcaTroubleTicket xmlns:NS1="http://www.ibm.com/xmlns/prod/websphere/j2ca/sap/sapzisuhvcatroubleticket">
<SAPTransactionID>0ADA1FA20100525579085B52</SAPTransactionID>
</NS1:SapZisuHvcaTroubleTicket>
<MQMD>
<MsgId>414d5120555549444130312020202020524f3e4420076757</MsgId>
<CorrelId>414d5120555549444130312020202020524f3e4420076757</CorrelId>
</MQMD>

ESQL is as followed:

CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
CALL CopyEntireMessage();
create field OutputRoot.XMLNSC.MQMD;
declare MQHeader reference to OutputRoot.XMLNSC.MQMD;
SET MQHeader.MsgId = InputLocalEnvironment.WrittenDestination.MQ.DestinationData.msgId;
SET MQHeader.CorrelId = InputLocalEnvironment.WrittenDestination.MQ.DestinationData.msgId;
RETURN TRUE;
END;


Regards,
AkBar Dar

Telecommute Day: Wednesday

Disclaimer This e-mail, and any attached file(s), is intended solely for the use of the individual or entity to whom this e-mail is addressed and may contain information that is privileged, confidential or exempt from disclosure. If you are not one of the named recipient(s) or otherwise have reason to believe that you have received this message in error, please notify the sender or call UI at 203-499-2222 and delete this message immediately from any computer. Any other use, retention, dissemination, retransmission, printing or copying of this e-mail or its contents (including any attached files) is strictly prohibited.

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html

Loading...