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 » cobol packed decimal (WBIMB V5. 06)

Post new topic  Reply to topic
 cobol packed decimal (WBIMB V5. 06) « View previous topic :: View next topic » 
Author Message
EgilsJ.Rubenis
PostPosted: Tue Apr 17, 2007 5:51 am    Post subject: cobol packed decimal (WBIMB V5. 06) Reply with quote

Acolyte

Joined: 18 Nov 2002
Posts: 63
Location: Germany, Alfeld

Hi,

i generated a message by importing a cobol copybook. It contains a clause
"07 fldname PIC S9(12)V9(6) COMP-3 VALUE ZERO." whereof i would say it should come up in the message definition with
" Type: Packed Decimal
Length: 18
Signed: Yes
Virtual Decimal Points: 6

I understand all this. But i can't find the place to set it manualy to packed decimal with virtual dec points 6. I just hav "xsd:decimal" as base type.


But in the message it just says type XSD:decimal. Mapping the inbound to the outbound it comes up with a catch:


(0x01000000):ConversionException = (
(0x03000000):File = 'F:\build\S500_P\src\cpi\bsutils\datacnv.cpp'
(0x03000000):Line = 3638
(0x03000000):Function = 'DataCnv::PckdDecFromDec'
(0x03000000):Type = ''
(0x03000000):Name = ''
(0x03000000):Label = ''
(0x03000000):Text = 'CPI InputData Too Long'
(0x03000000):Catalog = 'BIPv500'
(0x03000000):Severity = 3
(0x03000000):Number = 5507
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = 'decimal'
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = 'packed decimal'
)
(0x01000000):Insert = (
(0x03000000):Type = 2
(0x03000000):Text = '10'
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = '123456789012123456'


Thanks for your help

Cheers, Egils[/list]
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Tue Apr 17, 2007 6:12 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You would set these on the physical properties of the CWF layer for the element.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
EgilsJ.Rubenis
PostPosted: Tue Apr 17, 2007 7:06 am    Post subject: Reply with quote

Acolyte

Joined: 18 Nov 2002
Posts: 63
Location: Germany, Alfeld

Thanks jefflowrey,

the definition is:

Packed Decimal
Length: 10
Signed: Yes
Virtual Decimal Points: 6 for

"07 fldname PIC S9(12)V9(6) COMP-3 VALUE ZERO."

But still i get the same catch on the field.

Is the length wright? 12 + 6 = 18 / 2 = 9+1 = 10. Or do i have to aplly the total unpacked length (18 bytes) as length ?

Cheers, Egils
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Tue Apr 17, 2007 8:17 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It's been a while since I've worked with packed decimals. I would tend to take the length that is produced when you import the CopyBook into a CWF message.

That is, trust the product to do the right thing.

But the length on the CWF element is the number of bytes used to represent the data, not necessarily the number of digits used. And it should be the number of bytes to represent the packed number, not the unpacked number - as it represents the length of the data in the bitstream, not the logical representation of that data.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
wbi_telecom
PostPosted: Tue Apr 17, 2007 11:49 am    Post subject: Reply with quote

Disciple

Joined: 15 Feb 2006
Posts: 188
Location: Harrisburg, PA

The error you are getting (BIP5507) indicates that
"A data conversion during reading or writing of a message failed because the input data was too long for the output data type"
Also I see 18 bytes in the "data value" and 10 in the "maximum expected length" in the trace of your exception. I think the message set is trying to fit a 18 byte field in the field that has 10 byte as maxium length.
(courtesy contact admin messages in Information center)

Can you try to change the length to 18 and test. I agree that once you import the copybook with packed decimal into broker, it should take care of the length but it's not working in this case.

Cheers,
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Apr 17, 2007 11:58 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It's also possible that your field is too long to be handled by Broker.

The info center suggests that 10 bytes is the maximum length for a PackedDecimal.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
EgilsJ.Rubenis
PostPosted: Wed Apr 18, 2007 12:45 am    Post subject: not working Reply with quote

Acolyte

Joined: 18 Nov 2002
Posts: 63
Location: Germany, Alfeld

Hi guys,

thanks for your input.

i tried:

putting total length to 18. Is not working.
Am i wrigtht by just mapping it it like "set a = b" ?
whereof a is a decimal field with 12,6 (total18) and b is the same just packed. Or do i need to do a cast?

Lets say the definition is really to long.

If nothing is working what are the chances. Do i need to develop it on my own?

Does somebody know an IBM techi who could answer this?

Cheers, Egils
Back to top
View user's profile Send private message Send e-mail
EgilsJ.Rubenis
PostPosted: Wed Apr 18, 2007 1:01 am    Post subject: Reply with quote

Acolyte

Joined: 18 Nov 2002
Posts: 63
Location: Germany, Alfeld

Hi,

looking at the manual i found following:

PIC 9(m)V9(n) COMP or COMP-3
Integer or Packed Decimal
Length = CEILING((n+m+1)/2) for COMP-3

Virtual Decimal Point = n

Would mean, that my field lenth should be 10 ((12+6)+1)/2 = 10bytes

by the way this seems as trhe max that is possible for a packed field
Back to top
View user's profile Send private message Send e-mail
wbi_telecom
PostPosted: Wed Apr 18, 2007 5:45 am    Post subject: Reply with quote

Disciple

Joined: 15 Feb 2006
Posts: 188
Location: Harrisburg, PA

Your message set definition looks right. Is it possible that the value you are getting is not adhering to the datatype. I am not an expert in mainframe technologies but are you expecting 123456789012123456 in that field? (That's what is present in the exception).
I have imported copybooks with packed decimal before and I do not recall any additional setting that I had to make after the import. The length is taken care off by the broker while it imports.

Cheers,
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Apr 18, 2007 8:56 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
i can't find the place to set it manually to packed decimal with virtual dec points 6
Go to the Broker Development perspective. First select your element in the Outline view at the bottom left of the screen. At the bottom of the main editor window, there are two tabs labelled 'Outline' and 'Properties'. Select Properties and then select your CWF physical format from the tree view on the left.
Back to top
View user's profile Send private message
littlechild
PostPosted: Thu Apr 26, 2007 6:15 am    Post subject: Reply with quote

Novice

Joined: 22 Apr 2007
Posts: 17

looking at the manual i found following:

PIC 9(m)V9(n) COMP or COMP-3
Integer or Packed Decimal
Length = CEILING((n+m+1)/2) for COMP-3

----------------------------------------------------------------
AFAIK the above calculation is true when the data type is for PIC S9(m)V9(n).
For PIC 9(m)V9(n) this Length = CEILING((n+m)/2) is correct.


Assume you have create msg set well the data length for this would be 9 if data type is PIC 9(m)V9(n) else 10 for PIC S9(m)V9(n).

and while writting in mainframe this "v" doesnot means that decimal will be phisically present.This "v" is for its internal understanding of main frame.

so if ur giving you are giving i/p as 1222.000000 it wil take as 1222000000.
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 » cobol packed decimal (WBIMB V5. 06)
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.