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 handle PIC '9999' in message set?

Post new topic  Reply to topic
 How to handle PIC '9999' in message set? « View previous topic :: View next topic » 
Author Message
jamesyu
PostPosted: Mon Jul 06, 2009 6:26 am    Post subject: How to handle PIC '9999' in message set? Reply with quote

Acolyte

Joined: 31 Jan 2007
Posts: 70

Hi,

An IMS transaction written by PL/I sents me an EBCDIC message that contains a field called PRODUCT_COUNT with the value of "F0F0F0F1" (ascii: 0001, meaning only one product found).

Here is the field defination:
PRODUCT_COUNT PIC '9999', /* NUMBER OF PRODUCTS */

I tried to define this field in my message set with CWF (too late to change it back to TDS) with the following:

Logical type = xsd:short

Physical type = External Decimal:
Length = 4 bytes

The rest of properties are default.

But when I turned on debugger, I saw a big interger number other than 1 which is i am expecting to see...

What am I missing here?

Thanks,
James
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Jul 06, 2009 6:30 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

endianness?
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Jul 06, 2009 6:35 am    Post subject: Re: How to handle PIC '9999' in message set? Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

jamesyu wrote:
I tried to define this field in my message set with CWF (too late to change it back to TDS) with the following:

Logical type = xsd:short

Physical type = External Decimal:
Length = 4 bytes


Not used PL/1 for 20 years, but isn't that picture a numeric character? Certainly 'F0F0F0F1' is '0001' is EBCDIC unless I'm much mistaken (and could be). So xsd:short is going to interpret it as a really big number surely?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jamesyu
PostPosted: Mon Jul 06, 2009 6:40 am    Post subject: Reply with quote

Acolyte

Joined: 31 Jan 2007
Posts: 70

kimbert wrote:
endianness?


Normal byte order, not reversed
Back to top
View user's profile Send private message
jamesyu
PostPosted: Mon Jul 06, 2009 6:41 am    Post subject: Re: How to handle PIC '9999' in message set? Reply with quote

Acolyte

Joined: 31 Jan 2007
Posts: 70

I tried a number of types with logical, physical etc...

Now I am tired and I just wanted to know how to configure this in MS?

Many many thanks!
Back to top
View user's profile Send private message
jamesyu
PostPosted: Mon Jul 06, 2009 6:43 am    Post subject: Re: How to handle PIC '9999' in message set? Reply with quote

Acolyte

Joined: 31 Jan 2007
Posts: 70

Oh, by the way, only if I cahnged to xsd:string, then it shows '0001' in memory tree which is what I want... But I hate to alter the type to string every this kind of field.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Jul 06, 2009 6:45 am    Post subject: Re: How to handle PIC '9999' in message set? Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

jamesyu wrote:
Now I am tired and I just wanted to know how to configure this in MS?


It's a hard life, and I recommend a caffinated beverage...

Well I've offered my guess; shame you've tried that & it didn't work!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
zpat
PostPosted: Mon Jul 06, 2009 7:19 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

I learnt PL/I many years ago. PIC '9999' is just character representation of a numeric value (with leading zeros included).
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Jul 06, 2009 8:40 am    Post subject: Re: How to handle PIC '9999' in message set? Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

jamesyu wrote:
Oh, by the way, only if I cahnged to xsd:string, then it shows '0001' in memory tree which is what I want... But I hate to alter the type to string every this kind of field.


Which is what I'd expect - PIC 9 represents numeric character. Like I said.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Jul 06, 2009 8:47 am    Post subject: Re: How to handle PIC '9999' in message set? Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Vitor wrote:
jamesyu wrote:
Oh, by the way, only if I cahnged to xsd:string, then it shows '0001' in memory tree which is what I want... But I hate to alter the type to string every this kind of field.


Which is what I'd expect - PIC 9 represents numeric character. Like I said.


You should be able to tell the model to read this value as a number and interpolate the characters into an integer. This should be straight forward.

If you are getting a high value number when you expect a low value number, then you have the wrong endianness on the message definition element.
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 » How to handle PIC '9999' in message set?
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.