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 » MQSI MRM and LOW VALUES

Post new topic  Reply to topic
 MQSI MRM and LOW VALUES « View previous topic :: View next topic » 
Author Message
jrannis
PostPosted: Thu Mar 07, 2002 2:37 pm    Post subject: Reply with quote

Novice

Joined: 04 Nov 2001
Posts: 10
Location: Waterloo Ontario

Is there a way to fill an MRM string with all low values, that is, HEX ZEROS without using the padding rule of NUL.

The following does not work, but it might give you an idea of what I trying to accomplish:

SET OutputRoot.MRM.testnumber = COALESCE(InputRoot.XML.testnumber, X'0000000000')

where MRM.testnumber is defined as STRING LENGTH 5, right justified PAD ZERO.

Essentially, if I get a <testnumber> element in my XML I want to send it right justified padded with leading zeros.
If I don't get a <testnumber> element in my XML I still must assign something to the MRM.testnumber, and we want it to be low-values.

This is my attempt at implementing something that mimics conditional padding which does not exist in the product (that I know of!)

The error I get from this is that I'm trying to assign a BLOB to a STRING field.

Any help would be great!


Thanks,
Jason.
Back to top
View user's profile Send private message
kirani
PostPosted: Thu Mar 07, 2002 2:55 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

What version of WMQI are you using? You can assign default valie to MRM fields in WMQI 2.1

Why do you want to assign a numeric value to STRING data type? If you are not going to receive any char type data into XML.testnumber then You could define MRM.testnumber as Integer (Extended decimal) of length 5 (right justify). I think all numberic fields are padded by 0 by default. Use following ESQL in your compute node,

IF (InputRoot.XML.testnumber IS NOT NULL ) THEN
SET OutputRoot.MRM.testnumber = CAST (InputRoot.XML.testnumber as INT);
ELSE
SET OutputRoot.MRM.testnumber = 0;
END IF;


This may solve your problem.

Regards,
Kiran
Back to top
View user's profile Send private message Visit poster's website
jrannis
PostPosted: Fri Mar 08, 2002 5:13 am    Post subject: Reply with quote

Novice

Joined: 04 Nov 2001
Posts: 10
Location: Waterloo Ontario

Thanks Kiran!

Were still on MQSI v2.0.1.2

The reason I'm assigning a numeric value to a string is because we want to indicate in the MRM that a certain element in the XML did not arrive. We don't simply want to assign zero because zero could be the value.
By making it STRING we have the option of assigning it LOW-VALUES or the actual value right justified padded with zeros (which looks numeric).

You cannot assign a NULL value to a numeric element.

In short, it is a NULL indicators without having to having a seperate MRM elements to indicate this.

Regards,
Jason.
Back to top
View user's profile Send private message
pchan
PostPosted: Tue Apr 22, 2003 7:50 am    Post subject: Reply with quote

Newbie

Joined: 20 Feb 2002
Posts: 3

Jason,

We're trying to do something similar.

Wondering if you've found a solution to your problem. Any help is appreciated. Thanks.

Perry
Back to top
View user's profile Send private message Send e-mail
kirani
PostPosted: Tue Apr 22, 2003 9:57 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Perry,

Try this:
a) set Padding char to NUL for your MRM string element.
b) Use following ESQL code:
Code:

SET OutputRoot.MRM.testnumber = COALESCE(InputRoot.XML.testnumber,'')

_________________
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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » MQSI MRM and LOW 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.