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 » version to 6.1 - assigning values

Post new topic  Reply to topic
 version to 6.1 - assigning values « View previous topic :: View next topic » 
Author Message
vijayakumar
PostPosted: Thu Apr 21, 2011 4:48 am    Post subject: version to 6.1 - assigning values Reply with quote

Centurion

Joined: 01 Aug 2010
Posts: 101

In version 5, we have a message set which is having the element as T_val with datatype as xsd:string

and have the code used it as

Set OutputRoot.MRM.T_val = X'0a'; which is working fine.

If we upgrade into version 6 and used the same message set and code.

But getting error as "Type not equal to String"

could you please help us whether any compatibility with the versions causing the issue.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Apr 21, 2011 5:00 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

It's likely that the 6.1 is doing better validation than the 5.0 ESQL editor did.

Try
Code:
--see how using code tags is nice?
Set OutputRoot.MRM.T_val VALUE=X'0a';
-- OR
Set OutputROot.MRM.T_val = CAST(X'0a' as CHARACTER);
Back to top
View user's profile Send private message
vijayakumar
PostPosted: Thu Apr 21, 2011 7:59 am    Post subject: Reply with quote

Centurion

Joined: 01 Aug 2010
Posts: 101

I need to convert the X'0a'.

If i give the code as such as you gave,

the o/p, getting as it is X'0a' . But i need to get the value for that.

Thanks
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Apr 21, 2011 8:05 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Right. I forgot to set a CCSID on the CAST.

I assume that the VALUE clause caused the same problem as the normal case?
Back to top
View user's profile Send private message
khudania
PostPosted: Wed Apr 27, 2011 6:46 am    Post subject: Reply with quote

Apprentice

Joined: 30 Nov 2004
Posts: 43

I have used the below code in one of my projects. This is working code from a 6.1 MB flow.

Quote:

DECLARE chrNextLine CHAR CAST(CAST('X''0A''' AS BLOB) AS CHAR CCSID refMsgIn.Properties.CodedCharSetId Encoding refMsgIn.Properties.Encoding DEFAULT 'CAST FAILED');


I have then assigned chrNextLine wherever I had to use the next line caret return.

hope this would help to solve your problem.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Apr 27, 2011 6:48 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

That code is doing a significant amount of extra work for no added value.
Back to top
View user's profile Send private message
khudania
PostPosted: Wed Apr 27, 2011 6:56 am    Post subject: Reply with quote

Apprentice

Joined: 30 Nov 2004
Posts: 43

mqjeff wrote:
That code is doing a significant amount of extra work for no added value.


You mean this part

Quote:
CAST('X''0A''' AS BLOB)


This part was meant to convert a string to the caret VALUE blob.

rest all is preity standard.
Back to top
View user's profile Send private message
vijayakumar
PostPosted: Wed Apr 27, 2011 12:12 pm    Post subject: Reply with quote

Centurion

Joined: 01 Aug 2010
Posts: 101

Thanks khudiana .

how i can set the value for ccsid and encoding in the code,since we dont have the values from the properties of the message tree.

can we directly assign the ccsid as 819.
Back to top
View user's profile Send private message
vijayakumar
PostPosted: Wed Apr 27, 2011 12:41 pm    Post subject: Reply with quote

Centurion

Joined: 01 Aug 2010
Posts: 101

As you gave, the code is used below

DECLARE Endchr CHAR CAST(CAST('X''0A''' AS BLOB) AS CHAR CCSID InputRoot.Properties.CodedCharSetId ENCODING InputRoot.Properties.Encoding);

Set OutputRoot.XML.DocTX.Eline=Endchr;

The output for this coming as .
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Apr 27, 2011 12:43 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

vijayakumar wrote:
The output for this coming as .


Coming as '.' in what sense? Many message viewers use '.' for values which can't be represented as printable characters.

What's the actual value?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
vijayakumar
PostPosted: Wed Apr 27, 2011 1:08 pm    Post subject: Reply with quote

Centurion

Joined: 01 Aug 2010
Posts: 101

The value of Endchr is coming as . (instead of next line caret return) after it is casted
Back to top
View user's profile Send private message
vijayakumar
PostPosted: Thu Apr 28, 2011 3:59 am    Post subject: Reply with quote

Centurion

Joined: 01 Aug 2010
Posts: 101

Sorry, the value of

Set OutputRoot.MRM.DocTX.Eline=Endchr;

is not coming as <LF> instead it is coming as .
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Apr 28, 2011 4:02 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

the character "." is likely being used to indicate "a non-visible" character, and thus is actually the <lf> character.
Back to top
View user's profile Send private message
khudania
PostPosted: Thu Apr 28, 2011 4:40 am    Post subject: Reply with quote

Apprentice

Joined: 30 Nov 2004
Posts: 43

vijayakumar wrote:
Sorry, the value of

Set OutputRoot.MRM.DocTX.Eline=Endchr;

is not coming as <LF> instead it is coming as .



Just for trial,

SET C = 'A'||Endchr||'B';

Print this to log file or may be see in the debugger to check if A and B are separated by <lf> or a character '.'
_________________
If the doors of perception were cleansed, everything would appear as it is - infinite
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 » version to 6.1 - assigning values
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.