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 » Uanble to parse testdata with Cobolcopy book

Post new topic  Reply to topic
 Uanble to parse testdata with Cobolcopy book « View previous topic :: View next topic » 
Author Message
adireddy123
PostPosted: Tue Sep 27, 2011 5:38 am    Post subject: Uanble to parse testdata with Cobolcopy book Reply with quote

Newbie

Joined: 20 Sep 2011
Posts: 9

Hi
I had one cobolcopy book and testdata

cobolcopy book is excepting 9000 bytes but testdata had only 7200 bytes

some fileds in CobolCopybook are optional ,so size of testdata is less than what cobolcopy book expecting

So i am unble to parse ..Can anyone help me , how to make optional fileds without parsing
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Sep 27, 2011 5:45 am    Post subject: Re: Uanble to parse testdata with Cobolcopy book Reply with quote

Grand High Poobah

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

adireddy123 wrote:
some fileds in CobolCopybook are optional ,so size of testdata is less than what cobolcopy book expecting


Ok, now back in my day a COBOL copybook described a series of fields. The closest you got to an "optional" field was an OCCURS DEPENDING ON and I'm not entirely convinced a zero was legal there. So how have you achived this? Perhaps you could post the "optional" parts of the copybook definition?

adireddy123 wrote:
how to make optional fileds without parsing


Well you'll have to edit the message set to indicate those fields may not be present with min occurs. I expect the copybook inport wizard is as confused as I am so you'll have to cook this manually.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
muralihegde
PostPosted: Tue Sep 27, 2011 6:35 am    Post subject: Reply with quote

Centurion

Joined: 30 Apr 2002
Posts: 108

Actually we have the scenrio, where we have to parse the data which conforms to a cobol copy book and generate an XML output.
That is the input data comes from a COBOL application.
We are trying to create a message set in MB by importing the COBOL copybook.

There are certain fields defined as optional in the COBOL copybook. Also some fields can occur multiple times.

The message set is created and for optional fields we have made the min occurs as zero and for repeating fields/structures we have the max occurs defined similarly say 999 as the max occurs.

But when we try to parse the input data, we see parsing errors in the message broker, where it does not recognize if some optional fields are NOT present.

How can we construct the message set such that the message broker can recognize that a certain element or a whole structure(type) is optional or repeating?
Back to top
View user's profile Send private message Yahoo Messenger
Vitor
PostPosted: Tue Sep 27, 2011 6:38 am    Post subject: Reply with quote

Grand High Poobah

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

muralihegde wrote:
There are certain fields defined as optional in the COBOL copybook.


Defined how? Post that section of the copybook.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
ruchir
PostPosted: Wed Sep 28, 2011 10:57 pm    Post subject: Reply with quote

Guest




CobolCopy book has a REDEFINE property , using this u can make choice in copybook and parse the data accordingly
Back to top
kimbert
PostPosted: Thu Sep 29, 2011 1:21 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

So those fields are not 'optional'. If they were optional they would have minOccurs=0. These fields are alternatives - they are members of a choice group.

We cannot help unless you describe your data format in detail, or else post the copybook.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Sep 29, 2011 1:24 am    Post subject: Reply with quote

Grand High Poobah

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

ruchir wrote:
CobolCopy book has a REDEFINE property , using this u can make choice in copybook and parse the data accordingly


You have to be careful here. A REDEFINE on the copy translates into a choice, but certainly does not make any field optional.

Also I believe that once you have made a choice as to which branch of the choice you use, that's it. No come back and parse this part again with the other branch. So both on receiving and sending you have to be able to determine, in your program, which branch to take, BEFORE you hit the choice point.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
ruchir
PostPosted: Thu Sep 29, 2011 1:51 am    Post subject: Reply with quote

Guest




muralihegde wrote:
How can we construct the message set such that the message broker can recognize that a certain element or a whole structure(type) is optional or repeating?

There is a propery in message set :

Goto properties for that element and select physivcal properties . In physical properties there is 'Occurences'. You can select Repeat reference variable there to restrict the occurence of that element. Hope it helps

fjb_saper wrote:
A REDEFINE on the copy translates into a choice, but certainly does not make any field optional

yup u r rite. It just makes the field to have choice but don't make it optional.
Back to top
Vitor
PostPosted: Thu Sep 29, 2011 4:47 am    Post subject: Reply with quote

Grand High Poobah

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

In addition to endorsing the comments of my associates (a REFDEFINES is not an optional field but a choice), I'd like to point out this is actually mentioned in the InfoCenter.

So for the record the OP's problem is that the test data is 1800 bytes too short.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » Uanble to parse testdata with Cobolcopy book
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.