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 » HttpRequest Identifier casting error

Post new topic  Reply to topic
 HttpRequest Identifier casting error « View previous topic :: View next topic » 
Author Message
cvag
PostPosted: Fri Jul 29, 2011 3:29 am    Post subject: HttpRequest Identifier casting error Reply with quote

Centurion

Joined: 17 Mar 2008
Posts: 127

Hi,
Can anyone please help me, in CASTING the HttpRequest Identifier to CHAR.
Am stuck with CASTING error

Am coding:
SET Environment.variable.identifier = CAST(InputLocalEnvironment.Destination.HTTP.RequestIdentifier AS CHARACTER CCSID InputRoot.Properties.CodedCharSetId ENCODING InputRoot.Properties.Encoding);

Where CCSID and ENCODING are the values of windows and taking the values from the property.

Suggest pls


Thanks in Advance
Back to top
View user's profile Send private message
vmcgloin
PostPosted: Fri Jul 29, 2011 4:17 am    Post subject: Reply with quote

Knight

Joined: 04 Apr 2002
Posts: 560
Location: Scotland

What error does it give you?

And, why is your requirement to cast as character?
Back to top
View user's profile Send private message
cvag
PostPosted: Fri Jul 29, 2011 4:54 am    Post subject: Reply with quote

Centurion

Joined: 17 Mar 2008
Posts: 127

To log the HttpRequest IdentifIer into table (Datatype is CHARACTER)

Code:
ExceptionList
   RecoverableException
         File:CHARACTER:F:\build\S610_P\src\DataFlowEngine\ImbDataFlowNode.cpp
         Line:INTEGER:957
         Function:CHARACTER:ImbDataFlowNode::createExceptionList
         Type:CHARACTER:ComIbmWSInputNode
         Name:CHARACTER:Test_Http#FCMComposite_1_1
         Label:CHARACTER:Test_Http.HTTP Input
         Catalog:CHARACTER:BIPv610
         Severity:INTEGER:3
         Number:INTEGER:2230
         Text:CHARACTER:Node throwing exception
         RecoverableException
               File:CHARACTER:F:\build\S610_P\src\DataFlowEngine\ImbComputeNode.cpp
               Line:INTEGER:464
               Function:CHARACTER:ImbComputeNode::evaluate
               Type:CHARACTER:ComIbmComputeNode
               Name:CHARACTER:Test_Http#FCMComposite_1_3
               Label:CHARACTER:Test_Http.Compute
               Catalog:CHARACTER:BIPv610
               Severity:INTEGER:3
               Number:INTEGER:2230
               Text:CHARACTER:Caught exception and rethrowing
               RecoverableException
                     File:CHARACTER:F:\build\S610_P\src\DataFlowEngine\ImbRdl\ImbRdlStatementGroup.cpp
                     Line:INTEGER:602
                     Function:CHARACTER:SqlStatementGroup::execute
                     Type:CHARACTER:ComIbmComputeNode
                     Name:CHARACTER:Test_Http#FCMComposite_1_3
                     Label:CHARACTER:Test_Http.Compute
                     Catalog:CHARACTER:BIPv610
                     Severity:INTEGER:3
                     Number:INTEGER:2488
                     Text:CHARACTER:Error detected, rethrowing
                     Insert
                           Type:INTEGER:5
                           Text:CHARACTER:.Test_Http_Compute.Main
                     Insert
                           Type:INTEGER:5
                           Text:CHARACTER:6.3
                     Insert
                           Type:INTEGER:5
                           Text:CHARACTER:SET Environment.variable.identifier = CAST(InputLocalEnvironment.Destination.HTTP.RequestIdentifier AS CHARACTER CCSID InputRoot.Properties.CodedCharSetId ENCODING InputRoot.Properties.Encoding);
                     RecoverableException
                           File:CHARACTER:F:\build\S610_P\src\DataFlowEngine\ImbRdl\ImbRdlTypeCast.cpp
                           Line:INTEGER:257
                           Function:CHARACTER:SqlTypeCast::evaluate
                           Type:CHARACTER:
                           Name:CHARACTER:
                           Label:CHARACTER:
                           Catalog:CHARACTER:BIPv610
                           Severity:INTEGER:3
                           Number:INTEGER:2521
                           Text:CHARACTER:Error while casting
                           Insert
                                 Type:INTEGER:5
                                 Text:CHARACTER:.Test_Http_Compute.Main
                           Insert
                                 Type:INTEGER:5
                                 Text:CHARACTER:6.42
                           Insert
                                 Type:INTEGER:5
                                 Text:CHARACTER:X'414d512042524b514d20202020202020c70d304e20064006'
                           Insert
                                 Type:INTEGER:5
                                 Text:CHARACTER:CHARACTER
                           RecoverableException
                                 File:CHARACTER:F:\build\S610_P\src\CommonServices\ImbConverter.cpp
                                 Line:INTEGER:496
                                 Function:CHARACTER:ImbConverterCPP::internalToUnicode
                                 Type:CHARACTER:
                                 Name:CHARACTER:
                                 Label:CHARACTER:
                                 Catalog:CHARACTER:BIPv610
                                 Severity:INTEGER:3
                                 Number:INTEGER:2135
                                 Text:CHARACTER:Unconvertable character
                                 Insert
                                       Type:INTEGER:5
                                       Text:CHARACTER:c7
                                 Insert
                                       Type:INTEGER:5
                                       Text:CHARACTER:414d512042524b514d20202020202020c70d304e20064006
                                 Insert
                                       Type:INTEGER:2
                                       Text:CHARACTER:1208


Pls have the exceptionList[/quote]
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jul 29, 2011 5:12 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Don't cast it as a character with a CCSID.

Cast it as a character *without* a CCSID.

This will give you "X'414d512042524b514d20202020202020c70d304e20064006' ".

Insert *that* into your database.
Back to top
View user's profile Send private message
cvag
PostPosted: Sun Jul 31, 2011 11:27 am    Post subject: Reply with quote

Centurion

Joined: 17 Mar 2008
Posts: 127

Thanks mqjeff..

Will try without applying CCSID.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Aug 01, 2011 4:23 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

cvag wrote:
To log the HttpRequest IdentifIer into table (Datatype is CHARACTER)


Let's hope you are using solidDB or a Singleton to track your identifier or you will incur lots of latency waiting around for a database just for the sake of tracking your request.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
cvag
PostPosted: Mon Aug 01, 2011 5:32 am    Post subject: Reply with quote

Centurion

Joined: 17 Mar 2008
Posts: 127

Hi MQJeff..

Have tried without CCSID and used just CAST to CHAR type.

Getting error with :
[IBM][CLI Driver] CLI0109E String data right truncation. SQLSTATE=22001

If i don't CAST , its allowing something to insert into table.

Where as this CCSID and ENCODING will work for MQMD MsgId, and hoping this also should work for HttpRequestIdentifier, but this is not successful.

Pls correct and suggest for my assumption.

Thanks
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Aug 01, 2011 5:43 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

That means that the field is too small. You are trying to insert a hex value of the string data, which means that there are two characters for each byte in the reply identifier.

Plus the X character plus two single quote (') characters.

This is apparently more characters than your database column can have.

*You* need to *think* about this, and *determine* what you actually want to put into this column, and whether you want to put in a blob value or a character string or etc.

There are other options for doing this. But *neither* the MQMD.MsgId nor the HTTP Reply Identifier are natively *character* values, so you should *think* about how you want to store them.
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 » HttpRequest Identifier casting error
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.