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 » Parsing COBOL input data: 0x00 as NULL

Post new topic  Reply to topic
 Parsing COBOL input data: 0x00 as NULL « View previous topic :: View next topic » 
Author Message
Gralgrathor
PostPosted: Tue Jun 29, 2010 1:33 am    Post subject: Parsing COBOL input data: 0x00 as NULL Reply with quote

Master

Joined: 23 Jul 2009
Posts: 297

Dear Humans,

I have a COBOL copybook definition with a number of fields. First few fields are:
Code:
01  BRKINPUTDATA.
   03  BRK-GROUP-ONE.
       05  BRK-FIELD-ONE  PIC S9(07)V9(02)
            SIGN IS LEADING SEPARATE.
       05  BRK-FIELD-TWO     PIC S9(07)V9(02)
            SIGN IS LEADING SEPARATE.
       05  BRK-FIELD-THREE  PIC S9(07)V9(02)
                        SIGN IS LEADING SEPARATE.
       05  BRK-FIELD-FOUR   PIC  9(08).


I have a file containing the following data (where "." = 0x00):

Code:
+000000000+00000
0000+000000000..
................


The messageSet contains only a CWF representation 'Binary1'.

Now it's probably a case of RTFM (and me learning to read first), but I cannot seem to find the combination of settings that allows me to parse this data into an MRM tree. My best attempt so far failed while trying to parse the first 0x00's into the tree:

Code:
Jun 28 15:31:19 aix01 user:err|error WebSphere Broker v6105[5210124]: (BROKER01.TEST_GROUP)[8502]BIP5171E: An error occurred while a Custom Wire Format message was being parsed:  Current message: msg_BRKINPUTDATA  Current element: BRK_FIELD_FOUR  Path from message root: /msg_BRKINPUTDATA/BRK_GROUP_ONE  Offset from start of message: 38 : BROKER01.59b4c2b6-2501-0000-0080-8a9a514a2388: /build/S610_P/src/cpi/pwf/cwf/cwfworker.cpp: 315: CWFWorker::parseNext: :
Jun 28 15:31:19 aix01 user:err|error WebSphere Broker v6105[5210124]: (BROKER01.TEST_GROUP)[8502]BIP5505E: A data conversion failed because the data was invalid.  Type of data being read: decimal  Data: : BROKER01.59b4c2b6-2501-0000-0080-8a9a514a2388: /build/S610_P/src/cpi/bsutils/datacnv.cpp: 5440: DataCnv::validateDecimal: :


I need to find out:
- What settings to use when importing the copybook definition into the broker
- What settings to give the messageSet and the 'Binary1' representation.
- What settings to give the messageType definition and each field in it.

If anybody could direct me to the relevant section of the IBM documentation, to a thread where such matters are discussed or simply provide a solution, I'd be much happier than I am at the moment (it's bound to be something simple, given how much hair I've torn out so far).

Thank you in advance for your response!

Gr,

Gralgrathor
Back to top
View user's profile Send private message Send e-mail
Gralgrathor
PostPosted: Tue Jun 29, 2010 2:20 am    Post subject: Reply with quote

Master

Joined: 23 Jul 2009
Posts: 297

Found a partial solution which requires me to set the padding character to 0x00 and null encoding to NullPadFill for *EACH* field in the messageType.

In the interest of manageability of the messageSet (I want it to be a relatively simple matter for somebody to import a new copybook into the broker in case of updates) I would like a better solution.

Is there any?
Back to top
View user's profile Send private message Send e-mail
fatherjack
PostPosted: Tue Jun 29, 2010 9:34 am    Post subject: Re: Parsing COBOL input data: 0x00 as NULL Reply with quote

Knight

Joined: 14 Apr 2010
Posts: 522
Location: Craggy Island

Gralgrathor wrote:

I have a COBOL copybook definition with a number of fields. First few fields are:
Code:
01  BRKINPUTDATA.
   03  BRK-GROUP-ONE.
       05  BRK-FIELD-ONE  PIC S9(07)V9(02)
            SIGN IS LEADING SEPARATE.
       05  BRK-FIELD-TWO     PIC S9(07)V9(02)
            SIGN IS LEADING SEPARATE.
       05  BRK-FIELD-THREE  PIC S9(07)V9(02)
                        SIGN IS LEADING SEPARATE.
       05  BRK-FIELD-FOUR   PIC  9(08).


I have a file containing the following data (where "." = 0x00):

Code:
+000000000+00000
0000+000000000..
................




The data doesn't match the copy book does it?
_________________
Never let the facts get in the way of a good theory.
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 » Parsing COBOL input data: 0x00 as NULL
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.