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 » Trailing sign in CWF External Decimal field

Post new topic  Reply to topic
 Trailing sign in CWF External Decimal field « View previous topic :: View next topic » 
Author Message
martinrydman
PostPosted: Tue Jun 14, 2005 9:59 am    Post subject: Trailing sign in CWF External Decimal field Reply with quote

Centurion

Joined: 30 Jan 2004
Posts: 139
Location: Gothenburg, Sweden

Hi,

Im sending EBCDIC data to a OS390 system. All is well, except for some numeric fields, defiend as S9(9) (for instance).

Our counterpart on the OS390 expects a x'C0' for positive numbers and x'D0' for negative numbers as the last byte of the field. The only standard setting I've found that does something similar is the Trailing Separate Sign Orientation, but it inserts the more logical '+' or '-' as the last byte.

Any clues as how to handle this?

/Martin
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jun 14, 2005 10:31 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I think this is a packed decimal thingy. You'll have to either hand code it with ESQL, or use CWF to model the data.

Then I believe there is an option in the CWF handling for packed decimals that lets you specify this. If my faulty memory is correct.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
EddieA
PostPosted: Tue Jun 14, 2005 11:10 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
I think this is a packed decimal thingy

Nope. It's signed, external decimal.

I'm fairly sure this can be handled in CWF. Try importing a test COBOL copybook with one of these fields to see what it generates.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
martinrydman
PostPosted: Tue Jun 14, 2005 12:29 pm    Post subject: Reply with quote

Centurion

Joined: 30 Jan 2004
Posts: 139
Location: Gothenburg, Sweden

Hi, and thanks.

Eddie is right, it's not a packed field. Those, by the way, work a charm. Also, I did import a copy-book, and it got the COMP-3 (packed) fileds right with no further action. It's the unpacked fields that causes this. There are two options for trailing sign:

Quote:

Included Trailing. This sets a bit in the last byte on if the number is negative. No setting is made if the number is positive. Using this option, the number +22 would be x'3232' and the number -22 would be x'3272'.

Separate Trailing. This sets the last byte of the element to '+' if the number is positive and to '-' if the number is negative. For this option, the length must include the sign byte.


None of these do the trick, unfortunately. So, any further imput?

/Martin
Back to top
View user's profile Send private message
schofier
PostPosted: Wed Jun 15, 2005 2:24 am    Post subject: Reply with quote

Novice

Joined: 10 Dec 2003
Posts: 14
Location: IBM Hursley

Ensure that your element is defined as :

a) Signed
b) Sign Orientation = Trailing or Leading (depending on whether you want the sign nibble at the start or end of your field)
c) Ensure that your output message codepage is an EBCDIC codepage

You should then get 'C' for positive numbers and 'D' for negative numbers
Back to top
View user's profile Send private message AIM Address
martinrydman
PostPosted: Wed Jun 15, 2005 9:54 am    Post subject: Reply with quote

Centurion

Joined: 30 Jan 2004
Posts: 139
Location: Gothenburg, Sweden

Hi,

I've done all you suggest and, yes, the C and D appears on the *packed* fields but note the unpacked

/Martin
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Jun 15, 2005 10:01 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Is the Physical Type set to External Decimal?

http://publib.boulder.ibm.com/infocenter/wbihelp/index.jsp?topic=/com.ibm.etools.mft.doc/ad15400_.htm
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
martinrydman
PostPosted: Wed Jun 15, 2005 10:47 am    Post subject: Reply with quote

Centurion

Joined: 30 Jan 2004
Posts: 139
Location: Gothenburg, Sweden

Indeed it is

/Martin
Back to top
View user's profile Send private message
schofier
PostPosted: Thu Jun 16, 2005 12:30 am    Post subject: Reply with quote

Novice

Joined: 10 Dec 2003
Posts: 14
Location: IBM Hursley

Hi Martin,

I think I need a bit of clarification here. Can you explain what the difference is between your 'packed' fields and your 'unpacked' fields.

I think that sign 'included' is equivalent to your 'packed' fields.

Reading your first post am I correct in saying that in the 'unpacked' case you expect a separate byte set to 0xC0 for positve and 0xD0 for negative ?
(Note that in the sign 'separate' case the only supported 'characters' for the sign are (as you have observed) '+' and '-' (i.e. U+002B and U+002D))

Thanks

Richard
Back to top
View user's profile Send private message AIM Address
martinrydman
PostPosted: Thu Jun 16, 2005 3:22 am    Post subject: Reply with quote

Centurion

Joined: 30 Jan 2004
Posts: 139
Location: Gothenburg, Sweden

Hi,

The unpacked case has Physcal Type set to extended decimal, whereas the packed variety has Packed decimal. And, yes, my counterpart needs a separate byte, just like in your post

For now, I have a dirty solution by decreasing the actual length of the filed by one, inserting a 1 char field right after the decimal field, and manually insert { or }, but I'd hate to keep it if CWF supports this in a proper way.

/Martin
Back to top
View user's profile Send private message
schofier
PostPosted: Thu Jun 16, 2005 7:19 am    Post subject: Reply with quote

Novice

Joined: 10 Dec 2003
Posts: 14
Location: IBM Hursley

Martin,

In a signed external decimal field where the sign orientation is set to 'leading' or 'trailing' (rather than 'Leading Separate' or 'Trailing Separate') then (on an EBCDIC platform) the sign is represented by setting the first half of the first or last byte to be 0xC or 0xD appropriately. (i.e. the signs are packed even for external decimals)

So for example +1234 would be F1F2F3C4 or C1F2F3F4
and -1234 would be F1F2F3D4 or D1F2F3F4

I personally have never come across an extended decimal representation where a whole byte is used to represent the sign (i.e. the first nibble represents the sign and the second nibble is unused (i.e. set to zero.)) Certainly, there is no direct support within CWF for such a representation (apart from the separate sign representation which is limited to U+002B and U+002D as mentioned previously)

Hope this helps

Richard
Back to top
View user's profile Send private message AIM Address
EddieA
PostPosted: Thu Jun 16, 2005 7:26 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
separate byte set to 0xC0 for positve and 0xD0 for negative

I've never seen that either. It's not the way a PIC S9 field is supposed to work.
Quote:
manually insert { or }

Why. Just keep that field as part of the "number" and multiply by 10, so the last byte is always C0 or D0.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
martinrydman
PostPosted: Thu Jun 16, 2005 10:32 am    Post subject: Reply with quote

Centurion

Joined: 30 Jan 2004
Posts: 139
Location: Gothenburg, Sweden

Why? Well, I guess it's just my lack of understandig of what's really going on on the mainframe (not my area of expertise...). I'm not exactly sure how multiplying by ten will yield C0 and D0, but I'm sure when I try it out I'll understand it.

I feel I need to sit down with my counterpart and try the different settings again. It may be that I'm missing something obvious here, and reiterating all my attempts may show I've overlooked something.

Anyway, for no we produce curly brackets, and my counterpart is happy...

Thanks all for your input!

/Martin
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 » Trailing sign in CWF External Decimal field
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.