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 » Conversion of packed data to Unix numeric format

Post new topic  Reply to topic
 Conversion of packed data to Unix numeric format « View previous topic :: View next topic » 
Author Message
John
PostPosted: Mon Apr 22, 2002 4:17 pm    Post subject: Reply with quote

Novice

Joined: 21 Apr 2002
Posts: 23

I would like to know if MQSI V2 can convert packed data to numeric data recognized by Unix.

Thank you.
Back to top
View user's profile Send private message
kirani
PostPosted: Mon Apr 22, 2002 6:07 pm    Post subject: Reply with quote

Jedi Knight

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

Yes, you can do this by defining your messages in MRM.

_________________
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
John
PostPosted: Mon Apr 22, 2002 7:34 pm    Post subject: Reply with quote

Novice

Joined: 21 Apr 2002
Posts: 23

Great. Could you please provide a summary on how to accomplish the data conversion? or How to define it on Message Sets?

Thank you.
Back to top
View user's profile Send private message
Cliff
PostPosted: Tue Apr 23, 2002 3:08 am    Post subject: Reply with quote

Centurion

Joined: 27 Jun 2001
Posts: 145
Location: Wiltshire

John,
you need to define your input and output messages in one or more message sets in the normal manner, and assign your input fields to output fields in a Compute node again in the usual way. What you then need to do is to set the Encoding and CodedCharSetId fields of the output MQMD, so when the MQOutput node constructs the output bitstream it will apply the desired format:

Set OutputRoot.MQMD.Encoding = 273; /* Ascii big-endian */
Set OutputRoot.MQMD.CodedCharSetId = 437; /* UK code page */

You'll have to find out the values for your UNIX environment, of course!

HTH - Cliff
Back to top
View user's profile Send private message Send e-mail
kirani
PostPosted: Tue Apr 23, 2002 8:06 am    Post subject: Reply with quote

Jedi Knight

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

John,

What Cliff said is correct. I will try to give an example here to explain further.

Let's say you have a Packed Decimal field coming from Mainframe system which is defined as follows in the COBOL copybook,

03 FIELD-XXX PIC S9(14)V9(2) PACKED-DECIMAL.

After you import this into MRM, it is going to create element FIELD_XXX whose Logical Type is Float and Physical Type is Packed Decimal. Depending on your picture clause it is going to set other fields like Length - 9 bytes, Virtual Decimal - 2, ....

Now lets say you want to covert this field into numeric data type before sending it to UNIX system. The field that maps to this in UNIX is defined as follows,

struct some_struct {
...
double FIELD_XXX;
....
};

After you import this into MRM, you will get appropriate element physical and logical type.
Define 2 messages that maps to your COBOL and C structure into MRM.

You do the mapping from COBOL Copybook to C structure in a Compute node. Set the appropriate CCSID and Encoding in the MQMD header when the message is sent to UNIX system.

This will give you a field in numeric format on UNIX system!

Please let us know if you have further questions.


_________________
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
John
PostPosted: Tue Apr 23, 2002 3:36 pm    Post subject: Reply with quote

Novice

Joined: 21 Apr 2002
Posts: 23

Cliff and Kiran,

Thank you very much. I will give it a try.


[ This Message was edited by: John on 2002-04-23 16:39 ]
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 » Conversion of packed data to Unix numeric format
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.