|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Setting Element Attributes - having trouble |
« View previous topic :: View next topic » |
Author |
Message
|
LH33 |
Posted: Sun Mar 16, 2003 9:08 am Post subject: Setting Element Attributes - having trouble |
|
|
Master
Joined: 21 Nov 2002 Posts: 200
|
HI! I have to set 2 attributes of an element on my Output message. I am having trouble finding out how to do this in ESQL. Can someone help me? Thanks!! LisaB
The element is the one that is commented out in the following code:
SET OutputRoot = InputRoot;
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.
IF InputRoot.XML.ATLAS_XY_QUERY.DataArea.STATUS = 'SUCCESSFUL' THEN
CREATE FIELD OutputRoot.XML.ChangeJob;
CREATE FIELD OutputRoot.XML.ChangeJob.ApplicationArea;
CREATE FIELD OutputRoot.XML.ChangeJob.ApplicationArea.Sender;
CREATE FIELD OutputRoot.XML.ChangeJob.ApplicationArea.Sender.Component;
CREATE FIELD OutputRoot.XML.ChangeJob.ApplicationArea.Sender.Confirmation;
CREATE FIELD OutputRoot.XML.ChangeJob.ApplicationArea.Sender.AuthorizationId;
CREATE FIELD OutputRoot.XML.ChangeJob.ApplicationArea.CreationDateTime;
CREATE FIELD OutputRoot.XML.ChangeJob.ApplicationArea.BODId;
CREATE FIELD OutputRoot.XML.ChangeJob.DataArea;
CREATE FIELD OutputRoot.XML.ChangeJob.DataArea.Change;
CREATE FIELD OutputRoot.XML.ChangeJob.DataArea.Job;
CREATE FIELD OutputRoot.XML.ChangeJob.DataArea.Job.ExternalNumbers;
CREATE FIELD OutputRoot.XML.ChangeJob.DataArea.Job.Location;
CREATE FIELD OutputRoot.XML.ChangeJob.DataArea.Job.Location.Latitude;
CREATE FIELD OutputRoot.XML.ChangeJob.DataArea.Job.Location.Longitude;
SET OutputRoot.XML.ChangeJob.ApplicationArea.Sender.Component = 'ODL';
SET OutputRoot.XML.ChangeJob.ApplicationArea.Sender.Confirmation = 'OnError';
SET OutputRoot.XML.ChangeJob.ApplicationArea.CreationDateTime = current_timestamp;
SET OutputRoot.XML.ChangeJob.ApplicationArea.BODId = UUIDASBLOB;
-- SET OutputRoot.XML.ChangeJob.DataArea.Change = confirm = "Always" fieldid = "2";
SET OutputRoot.XML.ChangeJob.DataArea.Job.ExternalNumbers.ExternalNumber [1] =
InputRoot.XML.ATLAS_XY_QUERY.DataArea.RECORD_DATA.EXTERNAL_ONE;
SET OutputRoot.XML.ChangeJob.DataArea.Job.Location.Latitude =
InputRoot.XML.ATLAS_XY_QUERY.DataArea.Y_COORDINATE;
SET OutputRoot.XML.ChangeJob.DataArea.Job.Location.Longitude =
InputRoot.XML.ATLAS_XY_QUERY.DataArea.X_COORDINATE;
SET OutputRoot.XML.ATLAS_XY_QUERY = NULL;
ELSE
IF InputRoot.XML.ATLAS_XY_QUERY.DataArea.STATUS = 'UNSUCCESSFUL' THEN
Throw user exception message 2593 values ('Unsuccessful XY Retrieval from Atlas');
END IF;
END IF; |
|
Back to top |
|
 |
jefflowrey |
Posted: Sun Mar 16, 2003 9:31 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
This is documented in the ESQL Reference guide, and in the Working With Messages guide.
What you want to say instead of
Code: |
SET OutputRoot.XML.ChangeJob.DataArea.Change = confirm = "Always" fieldid = "2"; |
is
Code: |
Set OutputRoot.XML.ChangeJob.DataArea.Change.(XML.Attribute)confirm = "Always";
Set OutputRoot.XML.ChangeJob.DataArea.Change.(XML.Attribute)fieldID = "2"; |
If I understand what you're looking to build. |
|
Back to top |
|
 |
LH33 |
Posted: Sun Mar 16, 2003 9:33 am Post subject: |
|
|
Master
Joined: 21 Nov 2002 Posts: 200
|
Jeff - Many Thanks!! Can you tell me what Chapter in the ESQL reference guide it is in? I have been searching it all morning!
Thanks, LisaB |
|
Back to top |
|
 |
LH33 |
Posted: Sun Mar 16, 2003 10:25 am Post subject: |
|
|
Master
Joined: 21 Nov 2002 Posts: 200
|
I tried the code suggested and I now get an error when deploying the flow.
The code is:
Set OutputRoot.XML.ChangeJob.DataArea.Change.(XML.Attribute)confirm = "Always";
Set OutputRoot.XML.ChangeJob.DataArea.Change.(XML.Attribute)fieldID = "2";
the error is:
BIP2432E: (33, 75) : The correlation name 'Always' is not valid. Those in scope are: Environment, InputLocalEnvironment, OutputLocalEnvironment, InputRoot, InputBody, InputProperties, OutputRoot, InputExceptionList, OutputExceptionList, InputDestinationList, OutputDestinationList, TmpDate, CharDate, NewDate.
Thanks for any help you can provide!! LisaB |
|
Back to top |
|
 |
kirani |
Posted: Sun Mar 16, 2003 10:33 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Lisa,
Replace " in your code with ',
Code: |
Set OutputRoot.XML.ChangeJob.DataArea.Change.(XML.Attribute)confirm = 'Always';
Set OutputRoot.XML.ChangeJob.DataArea.Change.(XML.Attribute)fieldID = '2';
|
This is documented in chapter 2 - Messages and ESQL, topic - Referencing Information in XML messages. _________________ 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 |
|
 |
LH33 |
Posted: Sun Mar 16, 2003 10:44 am Post subject: |
|
|
Master
Joined: 21 Nov 2002 Posts: 200
|
Kiran,
Thanks so much!! I really appreciate teh help give to me - a NEWBIE. It's great to learn from someone so knowledgeable!
Have a great day!
Thanks, Lisa |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Mar 17, 2003 8:50 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Yes, sorry. That was a typo. |
|
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
|
|
|
|