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 » WebSphere Message Broker (ACE) Support » Error:Incompatible data types

Post new topic  Reply to topic
 Error:Incompatible data types « View previous topic :: View next topic » 
Author Message
sweety176
PostPosted: Thu Sep 01, 2005 9:55 am    Post subject: Error:Incompatible data types Reply with quote

Apprentice

Joined: 24 Aug 2005
Posts: 30

Following is my code
When I deployed the execution grp it gave me an error saying
Incompatible data types on either side of '=' in line 24,thats where i assign the FIELDVALUE(cursor1) to the element Value1
Could someone help me figure out the problem.


DECLARE C INTEGER;
SET C = CARDINALITY(InputRoot.*[]);
DECLARE I INTEGER;
SET I = 1;
WHILE I < C DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I=I+1;
END WHILE;
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.
DECLARE cursor1 REFERENCE TO InputRoot.XML.Envelope.Body.DocumentUpdRqMsg."DOCUMENT_UPDATE_REQUEST"."IMAGE"."ORIGINAL_LOAN".(XML.Attribute)*;
DECLARE cursor2 REFERENCE TO InputRoot.XML.Envelope.Body.DocumentUpdRqMsg."DOCUMENT_UPDATE_REQUEST"."IMAGE"."EMBEDDED_FILE".(XML.Attribute)*;
CREATE FIELD OutputRoot.XML."SOAP-Env:Envelope";

SET OutputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xmlns:dqrqfn" = InputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xmlns:durq";
SET OutputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xmlns:hrq" = InputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xmlns:hrq";
SET OutputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xmlns:jpmc" = InputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xmlns:jpmc";
SET OutputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xmlns:SOAP-Env" = InputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xmlns:SOAP-Env";
SET OutputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xmlns:xsi" = InputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xmlns:xsi";
SET OutputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xsi:schemaLocation" = InputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xsi:schemaLocation";
--Map input header to output header
CREATE FIELD
OutputRoot.XML."SOAP-Env:Envelope"."SOAP-Env:Body"."dqrqfn:DocumentQryRqMsg"."hrq:HdrOrigRqRmmMsgGrp" FROM InputRoot.XML."SOAP-Env:Envelope"."SOAP-Env:Body"."durq:DocumentUpdRqMsg"."hrq:HdrOrigRqRmmMsgGrp";

IF InputRoot.XML.Envelope.Body.DocumentUpdRqMsg.DOCUMENT_UPDATE_REQUEST.IMAGE.*[] ='ORIGINAL_LOAN'
THEN
SET OutputRoot.XML.Envelope.Body.DocumentQryRqMsg."DOCUMENT_QUERY_REQUEST".CRITERIA."PARAM_NAME" = 'LOS_Record_Number';
WHILE LASTMOVE(cursor1) DO
SET OutputRoot.XML.Envelope.Body.DocumentQryRqMsg."DOCUMENT_QUERY_REQUEST".CRITERIA."VALUE1" = FIELDVALUE(cursor1);
END WHILE;
END IF;


IF InputRoot.XML.Envelope.Body.DocumentUpdRqMsg.DOCUMENT_UPDATE_REQUEST.IMAGE.*[] = 'EMBEDDED_FILE'
THEN
SET OutputRoot.XML.Envelope.Body.DocumentQryRqMsg."DOCUMENT_QUERY_REQUEST".CRITERIA.PARAM_NAME = 'F_DOCNUMBER';
WHILE LASTMOVE(cursor2) DO
SET OutputRoot.XML.Envelope.Body.DocumentQryRqMsg."DOCUMENT_QUERY_REQUEST".CRITERIA."VALUE1" = FIELDVALUE(cursor2);
END WHILE;
END IF;
Code:
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Sep 01, 2005 9:59 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Are you not trying to assign a list to a scalar?

I do not know what FIELDVALUE will return, when passed a list - which (XML.Attribute)* will return.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
sweety176
PostPosted: Thu Sep 01, 2005 11:04 am    Post subject: Reply with quote

Apprentice

Joined: 24 Aug 2005
Posts: 30

I have an integer value in my attribute but I do not know the value so I put a *
VALUE1 which is defined in the o/p as a child of element CRITERIA,
the value of the attribute LoanOriginationSystemLoanIdentifier defined in the input XML should be placed as value of VALUE1 in O/p

the i/p XML is
<DOCUMENT_UPDATE_REQUEST>
<IMAGE>
<ORIGINAL_LOAN LoanOriginationSystemLoanIdentifier="12345"/>
<EMBEDDED_FILE jpmc:EmbeddedDocumentIdentifier="12345"/>
</IMAGE>
</DOCUMENT_UPDATE_REQUEST>


the o/p XML is
<DOCUMENT_UPDATE_REQUEST>
<CRITERIA>
<PARAM_NAME>LOS_Record_number></PARAM_NAME>
<VALUE1>abc</VALUE1>
<CRITERIA>
<CRITERIA>
<PARAM_NAME>F_DOCNUMBER></PARAM_NAME>
<VALUE1>abc</VALUE1>
<CRITERIA>

so if in the input message i get ORIGINAL_LOAN then my code should set the param name to LOS_record_Number and set value 1 to 12345.
else if i get EMBEDDED_FILE it should set param name to F_DOCNUMBER and assign its value to VALUE 1
Back to top
View user's profile Send private message
mgk
PostPosted: Thu Sep 01, 2005 12:04 pm    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Hi,

Am I correct in assuming that the following code you posted is not the actual code are running with?

Code:
WHILE LASTMOVE(cursor1) DO
SET OutputRoot.XML.Envelope.Body.DocumentQryRqMsg."DOCUMENT_QUERY_REQUEST".CRITERIA."VALUE1" = FIELDVALUE(cursor1);
END WHILE;


Because if it is, you will have an infinite lopp here as you do not ever MOVE cursor1 (assuming cursor1 is ever valid before the while loop).

Can you post the actual code, and the actual error message please.
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
sweety176
PostPosted: Thu Sep 01, 2005 12:39 pm    Post subject: resolved Reply with quote

Apprentice

Joined: 24 Aug 2005
Posts: 30

Hi
Thanks for all your immediate responses.
I resolved the issue.
I removed the WHILE loop and simply assigned the values.
It wasnt working initially as my syntax for the IF statement didnt include ( )
Hope it works now.
Regards
Sweety
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Error:Incompatible data types
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.