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 » Decimal Points from COBOL

Post new topic  Reply to topic
 Decimal Points from COBOL « View previous topic :: View next topic » 
Author Message
sandman147
PostPosted: Thu Feb 06, 2014 8:08 am    Post subject: Decimal Points from COBOL Reply with quote

Apprentice

Joined: 01 Sep 2013
Posts: 42

I have with me a msg def file created from a cobol copybook. I have a complex type 'BATCH' (Fixed Length) with elements

BATCH_RECORD (Properties; Physical Type:TEXT Length:4 )
BATCH_CHK_TOTAL (xsd:decimal) (Properties; Physical Type:Ext Decimal Length:14)
BATCH_CHK_COUNT (Properties; Physical Type:TEXT Length:5)
BATCH_REMIT_TOTAL (xsd:decimal) (Properties; Physical Type:Ext Decimal Length:14)
BATCH_REMIT_COUNT (Properties; Physical Type:TEXT Length:5)
BATCH_SUPP_TOTAL (xsd:decimal) (Properties; Physical Type:TEXT Length:4)
BATCH_SUPP_COUNT (Properties; Physical Type:Ext Decimal Length:14)
BATCH_FILLER (Properties; Physical Type:TEXT Length:16)

From the cobol copybook
BATCH_CHK_TOTAL PIC 9(12)V99 VALUE ZEROES.
BATCH_REMIT_TOTAL PIC 9(12)V99 VALUE ZEROES.
BATCH_SUPP_TOTAL PIC 9(12)V99 VALUE ZEROES.

Output Message Values

BATCH_RECORD ='98SD'
BATCH_CHK_TOTAL = '0'
BATCH_CHK_COUNT = '0'
BATCH_REMIT_TOTAL = '0'
BATCH_REMIT_COUNT = '0'
BATCH_SUPP_TOTAL = '0'
BATCH_SUPP_COUNT = '0'
BATCHFILLER = ' '


case 1:
In msg set Strict Numeric Checking = unchecked. Elements with base type xsd:decimal have External Decimal physical type and Virtual Decimal point = 2

Output for case1
98SD000000000000000000000000000000000000000000000000000000000

case 2:
In msg set Strict Numeric Checking = checked. Elements with base type xsd:decimal have TEXT physical type and precision = Explicit Decimal Point - decimal separator always required

Output for case2

98SD0000000000000.000000000000000000.000000000000000000.00000

case3:
In msg set Strict Numeric Checking = checked. Elements with base type xsd:decimal have TEXT physical type and precision = 2

Output for case 3
98SD00000000000.000000000000000000.000000000000000000.0000000

DESIRED OUTPUT
98SD000000000000.0000000000000000000.0000000000000000000.0000000

How can I generate the desired output ?
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Feb 06, 2014 8:17 am    Post subject: Re: Decimal Points from COBOL Reply with quote

Grand High Poobah

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

sandman147 wrote:
DESIRED OUTPUT
98SD000000000000.0000000000000000000.0000000000000000000.0000000

How can I generate the desired output ?


Why is this desired? It doesn't match the COBOL layout. The V in the picture clause is a virtual point not a physical one.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sandman147
PostPosted: Thu Feb 06, 2014 10:06 am    Post subject: Reply with quote

Apprentice

Joined: 01 Sep 2013
Posts: 42

ok, and if I actually wanted to insert a physical decimal point so it may be displayed in the output message, I would have to code that logic or can I configure this from within the message set ?
Example 123456789012.34 instead of 12345678901234
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Feb 06, 2014 10:20 am    Post subject: Reply with quote

Grand High Poobah

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

sandman147 wrote:
ok, and if I actually wanted to insert a physical decimal point so it may be displayed in the output message, I would have to code that logic or can I configure this from within the message set ?
Example 123456789012.34 instead of 12345678901234


The only difference I can see between case 3 and your desired output is field length. The message set can control that.

And again, that physical point doesn't match the picture clause.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sandman147
PostPosted: Thu Feb 06, 2014 10:48 am    Post subject: Reply with quote

Apprentice

Joined: 01 Sep 2013
Posts: 42

I will look into it. Thank you
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 » Decimal Points from COBOL
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.