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 » Not able to write non-XML message into database

Post new topic  Reply to topic Goto page Previous  1, 2
 Not able to write non-XML message into database « View previous topic :: View next topic » 
Author Message
kimbert
PostPosted: Wed Mar 26, 2014 6:51 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
we are manually inserting special characters in message body for testing purpose
So...are you inserting characters that are valid XML characters? If you are inserting invalid characters into the input XML then the XML parser is quite correct to complain about it.

See http://www.w3.org/TR/2006/REC-xml-20060816/#charsets
Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] /* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */

So the character 0x02 should be rejected by *any* XML parser.
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
shubham_057
PostPosted: Wed Mar 26, 2014 8:09 am    Post subject: Reply with quote

Novice

Joined: 24 Mar 2014
Posts: 14

@ganesh :
The messages are sent from a Mainframe application hosted on z/OS 1.11.

Broker is hosted on Linux.
One thing i would like to mention here is that this problem started after we migrated from Linux to Solaris.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Mar 26, 2014 8:16 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

shubham_057 wrote:
@ganesh :
The messages are sent from a Mainframe application hosted on z/OS 1.11.

Broker is hosted on Linux.
One thing i would like to mention here is that this problem started after we migrated from Linux to Solaris.


Are you really, really sure that the QMGR on Solaris is created identically to the one on Linux. I'm really referring to the QMGR CCSID.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
ganesh
PostPosted: Wed Mar 26, 2014 9:25 am    Post subject: Reply with quote

Master

Joined: 18 Jul 2010
Posts: 294

Quote:
I'm really referring to the QMGR CCSID.

I agree with smdavies99 that's what you should be looking at, check your mqmd header for ccsid value.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Mar 26, 2014 10:15 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

[quote="ganesh"]
Quote:

I agree with smdavies99 that's what you should be looking at, check your mqmd header for ccsid value.
using

The poster has to look at that BUT if the MQPUT is done the CCSID_AS_QMGR_DEFAULT for the CCSID then it is the QMGR CCSID that controls the value. If the two QMGRS have different CCSID's then the reason for the problem might be right in front of you.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
shubham_057
PostPosted: Mon Mar 31, 2014 6:17 am    Post subject: Reply with quote

Novice

Joined: 24 Mar 2014
Posts: 14

@samdavies99: I was looking to one of your posts on this forum and i realized i am also having the same problem but i did not understood how u fixed it.

Let me give a brief description of my problem again.
The sender application A is on mainframe and the receiving application B is on Linux.
The message from A is read by a flow at B and after reading it sends it for further processing which is working fine.
The problem is with another flow at B which reads this message and is supposed to put the message in database for auditing purpose. I'm using an Oracle database.
Instead of getting audited in db its falling in backout queue.
I also checked the CCSID of queue managers at A and B both are same i.e 819.

i'm using following code for inserting into d/b:

Code:

Insert Into Database.Message_Audit (UUID, MSID, Message_Type, Source_Application, Message_Body)
      Values ( SUBSTRING(msgUUID FROM 1 FOR 35),
      msid,
      SUBSTRING(messageType FROM 1 FOR 29),
      SUBSTRING(sourceApplication FROM (LENGTH(sourceApplication) - 9) FOR 10),
      msgChar);


can you tell me how you fixed your scripts??
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Mar 31, 2014 6:33 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

and what pray tell happens if the message_body contains binary data, i.e. packed decimals and such?

Your coding assumption is made on the fact that you would always get a text message... Also I would expect you to insert ASBITSTREAM(message_body) ...

Go back to the drawing board...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Mon Mar 31, 2014 7:08 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

shubham_057 wrote:



can you tell me how you fixed your scripts??


If you mean this --> post http://www.mqseries.net/phpBB2/viewtopic.php?t=44055

Then my last reply to the thread was clear. I edited the data in an editor that was able to handle UTF-8 data so that the umlauts etc were not mangled by something that could not handle it correctly. In this case I used UltraEdit.
Then the data was inserted into DB2 and everything worked.

Quite a few basic text editors can do all sorts of damage to your data. Experiment in opening your file, add a space, delete it and then save it. Then compare the files byte by byte. Get to know the good ones and the bad ones.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Not able to write non-XML message into database
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.