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 CopyBook, signed decimal

Post new topic  Reply to topic
 COBOL CopyBook, signed decimal « View previous topic :: View next topic » 
Author Message
mark.luebinski
PostPosted: Wed Sep 19, 2007 2:04 am    Post subject: COBOL CopyBook, signed decimal Reply with quote

Acolyte

Joined: 27 Mar 2006
Posts: 56

Dear Masters,

how must I define COBOL-Strutcture to get mssage-feld with logical typ decimal, CWF-Type "extern decimal", signed (on the first position - not on the last) with 1 virtual sign-position?

Normaly we have to use PIC S9(n), but it don't work, so generate the importer from PIC S9 one short with sign on the last position.

Thank you very much!

Mark
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Sep 19, 2007 2:17 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Not sure I understood all of that. Please can you
- give an example of the input field you are trying to parse
- describe the value you want to see in the message tree
Back to top
View user's profile Send private message
shalabh1976
PostPosted: Wed Sep 19, 2007 3:16 am    Post subject: Reply with quote

Partisan

Joined: 18 Jul 2002
Posts: 381
Location: Gurgaon, India

Do you mean to say that your data is coming as 123.56- and not as -123.56?
_________________
Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
mark.luebinski
PostPosted: Wed Sep 19, 2007 3:46 am    Post subject: Reply with quote

Acolyte

Joined: 27 Mar 2006
Posts: 56

Hi, kimbert,

I imported

11 VTECH-PERIODE PIC S9 VALUE ZERO.

and got (fields a re-translated back from German, so maybe not really the names of English toolkit)

logical properties -> logical element, type -> xsd:short
physical properties -> logical element, physical details
sign - checked
sign alligment -> End
and no chance to get virtual digit (also virtual decimal comma).

I would like to get

logical properties -> logical element, type -> decimal
physical properties -> logical element, physical details
sign - checked
sign alligment -> sign before of first byte
1 virtual comma

The question is: which COBOL-Structure I have to use?

Thank you very much!

Mark
Back to top
View user's profile Send private message
mark.luebinski
PostPosted: Wed Sep 19, 2007 3:48 am    Post subject: Reply with quote

Acolyte

Joined: 27 Mar 2006
Posts: 56

@shalabh1976
the problem is, I have to READ data and I get parse exception. I cannot use unique PLI-CopyBook because Toolkit cannot manage they, so I "translated" CopyBooks to COBOL. But worse.

Thank you!

Mark
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Sep 19, 2007 4:45 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I think if you use PIC +9 VALUE ZERO

You will get something useful.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
mark.luebinski
PostPosted: Wed Sep 19, 2007 5:44 am    Post subject: Reply with quote

Acolyte

Joined: 27 Mar 2006
Posts: 56

PIC +9 VALUE ZERO. generated STRING field!
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Sep 19, 2007 2:26 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

I think what you're looking for is a comp or comp-3 field which are binary numbers.

This means that the parsing will have to be made in the CCSID of the source...

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Thu Sep 20, 2007 2:43 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I asked:
Quote:
- give an example of the input field you are trying to parse
- describe the value you want to see in the message tree

So far, you have described you COBOL PIC clause but not your input field.

I suspect that you need PIC S9 (5). The 5 is a guess because I don't know how long your input field is. But it probably is not a 1-digit field, otherwise you would not be setting a virtual decimal separator.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Sep 20, 2007 2:55 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

@ kimbert

Just to clarify my addling mind, in order to have a virtual decimal separator don't you need a binary numeric field?

In which case we would need to have something like
pic S9(x)V9(y) comp-3 ?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mark.luebinski
PostPosted: Thu Sep 20, 2007 4:46 am    Post subject: Reply with quote

Acolyte

Joined: 27 Mar 2006
Posts: 56

Dear Masters,

@kimbert: I started with PIC S9... It sadly don't work. Sure, I used S9 for 1-digit values and S9(n) resp. S9(n)V(n) for longer and decimal values.

@fjb_saper: comp and comp-3 generated binary data - but xsd:short. And the positoin of the sing is grey, so I cannot set it to "first".

I guess, it is not possible to define the correct cobol-structure And I have to define it manually

But thank you for ideas!

Mark
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Sep 20, 2007 6:56 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Mark, please read this :
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/topic/com.ibm.etools.mft.doc/ad15380_.htm

I cannot image why you are experimenting with COMP-3 when your input data is external decimal.

And yes, you can have a virtual decimal point when your data is non-binary
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 CopyBook, signed decimal
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.