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 » How to use Binary DataType

Post new topic  Reply to topic
 How to use Binary DataType « View previous topic :: View next topic » 
Author Message
Thameem
PostPosted: Thu Jul 11, 2002 9:54 pm    Post subject: How to use Binary DataType Reply with quote

Newbie

Joined: 03 Jul 2002
Posts: 7

We need transformation of data at bit level. Is it possible to use Binary datatype for this purpose and how?

Thanks in Advance.
Thameem
Back to top
View user's profile Send private message
kirani
PostPosted: Fri Jul 12, 2002 7:59 am    Post subject: Reply with quote

Jedi Knight

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

Could you post an example of input and output data?
_________________
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
Thameem
PostPosted: Sun Jul 14, 2002 11:40 pm    Post subject: Reply with quote

Newbie

Joined: 03 Jul 2002
Posts: 7

Depending on several values in the input, we have to set the bits at appropriate position and construct a binary number. for eg:

we have to construct a binary string like 1101 0001 1101 0001 which occupies 2 digits.

It would be of great help if we can get some example of how to use binary datatype in MRM.

Thanks in Advance
Thameem
Back to top
View user's profile Send private message
kirani
PostPosted: Mon Jul 15, 2002 12:03 pm    Post subject: Reply with quote

Jedi Knight

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

Well, If you define a field as BINARY into MRM, it will be represented as BLOB (X'......' format). You could use CAST function to convert BLOB into BIT data type, and then use SUBSTRING to extract binary digits only. BIT values are represented in B'1001....' format.

For example, If you define a field into MRM of BINARY data type of length 2 bytes. You could use following code to get Binary digits for that field,

Code:

DECLARE mybin BIT;
SET mybin = CAST(InputRoot.MRM.BinaryFieldName AS BIT);

DECLARE binstring CHAR;
SET binstring = SUBSTRING(CAST(mybin AS CHAR) FROM 3 FOR 16);

_________________
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 » How to use Binary DataType
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.