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 » ASCII to Network byte order

Post new topic  Reply to topic
 ASCII to Network byte order « View previous topic :: View next topic » 
Author Message
laddu858
PostPosted: Fri Jun 27, 2014 1:21 pm    Post subject: ASCII to Network byte order Reply with quote

Novice

Joined: 19 May 2008
Posts: 10

I have a requirement to send the acknowledgement to the client in the 4 byte binary length network byte order once the message is successfully received.

How to convert this "00 00 00 06" to network byte order?

can you guys please tell me how to handle this in ESQL.

Thanks in advance.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Jun 27, 2014 1:49 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

How will you know what the correct 'network byte order' is?

Do you understand how 'byte order' affects the serialization of an integer value? If you do, then you should be able to write some ESQL to do the job. If you do not, then how will you test your solution?

FYI, byte order is usually handled by the parser when it automatically converts a message tree into a BLOB. DFDL and MRM will both write integers in a specified byte order. But that might be overkill for your simple scenario.
_________________
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
laddu858
PostPosted: Fri Jun 27, 2014 2:23 pm    Post subject: Reply with quote

Novice

Joined: 19 May 2008
Posts: 10

Thanks Kimbert.

Do you understand how 'byte order' affects the serialization of an integer value? If you do, then you should be able to write some ESQL to do the job. If you do not, then how will you test your solution?

-- can you please provide some more info on the byte order pls.
Back to top
View user's profile Send private message
laddu858
PostPosted: Fri Jun 27, 2014 2:50 pm    Post subject: Reply with quote

Novice

Joined: 19 May 2008
Posts: 10

I figured it out..

DECLARE clength BLOB 6;
SET clength = right(clength,4);

Thanks Kimbert
Back to top
View user's profile Send private message
kimbert
PostPosted: Sat Jun 28, 2014 4:10 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

No - this is not a training forum. You could easily look up 'byte order' using your favourite search engine.
FYI, your solution will not adjust the byte order.
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ASCII to Network byte order
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.