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 » CWF1 to XML1 generates error

Post new topic  Reply to topic
 CWF1 to XML1 generates error « View previous topic :: View next topic » 
Author Message
martc
PostPosted: Wed Mar 21, 2007 4:17 pm    Post subject: CWF1 to XML1 generates error Reply with quote

Apprentice

Joined: 23 Mar 2005
Posts: 39

Hi;

I have imported a cobol copybook with no problems running a message through the flow and dumping it out to an output queue with its format unconverted (CWF1).

However, when I change the messageformat to XML1 as in.

SET OutputRoot.Properties.MessageFormat = 'XML1';


I am getting this error:

"( DBLS45043.default ) Choice not resolved and output properties are not compatible: Message Set ''HDJFB5S002001'', Message Format ''XML1'', Message Type Path ''msg_DLYATUNPACKEDREC'', Parent Element ''DLYAT_TLOG_WORK_AREA''.

An unresolved choice was present in the message tree when the output properties are not compatible. For a choice to be written to the output without being resolved, the Message Set, Message Format, Message Type Path, CCSID and Encoding of the message being written must all be the same as that in the parsed message.

Ensure that all the properties are compatible or that all choices are resolved"

I reviewed the imported mxsd and I did not find a 'choice' anywhere. Can somebody shed some light on what I need to do to resolve this?

thanks
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Mar 21, 2007 5:12 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What is the DLYAT_TLOG_WORK_AREA defined as?

This is not a choice in the output, by the way, this is a choice in the INPUT.

Also, please don't read the mxsd files as XSD files. It leads to the risk that you'll just decide to edit it as an XSD file, and then who knows what kind of instability you'll run into.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Mar 22, 2007 12:44 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
I reviewed the imported mxsd and I did not find a 'choice' anywhere
Are you quite sure? The MRM parser obviously thinks that your output message tree contains a portion of bitstream representing an unresolved choice.
Have you tried putting in a Trace node to see what the message tree looks like?
Back to top
View user's profile Send private message
martc
PostPosted: Thu Mar 22, 2007 9:28 am    Post subject: Reply with quote

Apprentice

Joined: 23 Mar 2005
Posts: 39

Jeff/Kimbert;

Thanks for all your replies.

Here was my problem, as I imported the cobol copybook I did not realize that there were 5-8 'REDEFINES' such as:

07 DLYAT-ID-REF PIC X(16).
07 FILLER REDEFINES DLYAT-ID-REF.
10 DLYAT-ID-CNTL.
15 DLYAT-ID-CNTL-FIRM PIC X(04).
15 DLYAT-ID-CNTL-YR PIC X(01).
15 DLYAT-ID-CNTL-DDD PIC X(03).
15 DLYAT-ID-CNTL-SEQ PIC X(06).
15 DLYAT-ID-CNTL-CKDG PIC X(01).
15 DLYAT-CD-CORR PIC X(01).
.
.
07 DLYAT-QTY-FREE-SHR-MID PIC S9(10)V999.
07 DLYAT-QTY-SHRS-OLD REDEFINES
DLYAT-QTY-FREE-SHR-MID PIC S9(10)V999.
.
.
.
07 DLYAT-FLG-PAYEE-TXN-SPECIFIC PIC X(01).
A30019 07 DLYAT-CD-PAYEE REDEFINES
A30019 DLYAT-FLG-PAYEE-TXN-SPECIFIC PIC X(01).


It did not like that which now that I think about it makes sense because if converted to XML what tag would it select (this was the 'Choice' I guess it was complaining about and causing my head to spin)? The redefined or the original? So I removed the redefines it converted nicely.

thanks guys
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Mar 22, 2007 9:46 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

So the error message pointed you directly at the problem, that the field DLYAT-ID-REF was defined as a Choice in the Input message.

You just needed help reading the error message.

Now that you've made changes, and have something working... let me suggest that you made the wrong changes.

You probably need to go back to the COBOL programmers and ask them about these REDEFINES. You may need to write logic that will resolve this choice, based on what you have in the earlier part of the message.

Redefines are used to indicate variable data - that at this point in the record, you may get aaaaaa or you may get bbccdd. Your flow may need to process aaaaaa differently than it does bbccdd.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
martc
PostPosted: Thu Mar 22, 2007 1:13 pm    Post subject: Reply with quote

Apprentice

Joined: 23 Mar 2005
Posts: 39

Hmm ok, did not quite think about it that way.

Let me ask this, let's assume they are valid and need to be in the copybook, and I determine in the flow how to process each kind, what will I need to do in the code so the output choice gets resolved (solving the original issue)?

Will setting one choice to NULL do it?

thanks
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Mar 22, 2007 1:37 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Actually, to resolve a choice with CWF, what you do is merely access a particular field inside one of the choices.

Let's pretend that your copybook said something like

5 FIELD1 PIC X(
5 FIELD 2 REDEFINES FIELD1
10 FIELD2A PIC X(
5 FIELD3 REDEFINES FIELD1
10 FIELD3A PICX(2)
10 FIELD3B PICX(2)
10 FIELD3C PICX(2)
10 FIELD3D PICX(2)


And you had something else that told you if it was FIELD2 or FIELD3.

Once you knew that it was Field3, you could merely access FIELD3A, perhaps by setting an OutputRoot.XMLNS.Message.Body.Field3Name equal to InputRoot.MRM.MSG.FIELDS.FIELD3A

That would resolve the choice.

If you were using TDS, and you had good tags, TDS could actually resolve the choice for you, based on the tag.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
martc
PostPosted: Fri Mar 23, 2007 2:17 pm    Post subject: Reply with quote

Apprentice

Joined: 23 Mar 2005
Posts: 39

Ok, if that resolves the choice issue I can work with that.

Thanks
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 » CWF1 to XML1 generates error
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.