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 copy book REDEFINES question

Post new topic  Reply to topic
 COBOL copy book REDEFINES question « View previous topic :: View next topic » 
Author Message
Ching
PostPosted: Thu Jan 06, 2005 10:53 am    Post subject: COBOL copy book REDEFINES question Reply with quote

Apprentice

Joined: 08 Nov 2004
Posts: 25
Location: Portland, OR

Hi everyone,

I'm having problems using the REDEFINES in my COBOL copy book.
I'm trying to go from MRM -->XML data.

Here is my copy book:
01 RECORD.
05 RECID PIC X(02).
05 HDRREC.
10 HDRFIELD1 PIC X(01).
10 HDRFIELD2 PIC X(01).
05 DTLREC REDEFINES HDRREC PIC X(02).



In my test input file all I have is:

abcd


---------------------------------------------------
This is what I would expect the values to be:
RECID = ab
HDRFIELD1 = c
HDRFIELD2 = d
DTLREC = cd

----------------------------------------------------
Here is a snippet of my code:
DECLARE A CHARACTER;
DECLARE B CHARACTER;
DECLARE C CHARACTER;
DECLARE D CHARACTER;

SET A = InputRoot.MRM.RECID; --ab
SET B = InputRoot.MRM.HDRREC.HDRFIELD1; --c
SET C = InputRoot.MRM.HDRREC.HDRFIELD2; --d
SET D = InputRoot.MRM.DTLREC; --should be cd
SET OutputRoot.XML.DATA.A = A;
SET OutputRoot.XML.DATA.B = B;
SET OutputRoot.XML.DATA.C = C;
SET OutputRoot.XML.DATA.D = D;
-----------------------------------------------------------------------
Here is my output:
<DATA>
<A>ab</A>
<B>c</B>
<C>d</C>
</DATA>

I'm not sure what happened to the 'D' tag. It is never mapped.
It should have the value 'cd' right?

I'm expecting this as the output:
<DATA>
<A>ab</A>
<B>c</B>
<C>d</C>
<D>cd</D>
</DATA>

I've created the message set(based on the copybook) and the mappings for all the fields are correct, except the REDEFINED field.

Any help would be appreciated.
Thanks!

Ching
Back to top
View user's profile Send private message Send e-mail
JT
PostPosted: Thu Jan 06, 2005 1:48 pm    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Read up on the Composition property Choice.

The first reference in your ESQL code to one of the choice elements resolves the choice to the option that contains that element, thus when you referenced InputRoot.MRM.HDRREC, the parser doesn't recognize any remaining choices, in your case, InputRoot.MRM.DTLREC.
Back to top
View user's profile Send private message
Ching
PostPosted: Tue Feb 08, 2005 10:04 am    Post subject: Reply with quote

Apprentice

Joined: 08 Nov 2004
Posts: 25
Location: Portland, OR

Hi JT,

Where exactly do you specify the 'composition property'? Is it somewhere
in the message set? A node? I've been looking through the IBM documentation, but I can't find it.

Thanks,

Ching
Back to top
View user's profile Send private message Send e-mail
JT
PostPosted: Tue Feb 08, 2005 11:25 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

It's a property of the CWF group definition. See the following links for details:
http://publib.boulder.ibm.com/infocenter/wbihelp/topic/com.ibm.etools.mft.doc/ad10490_.htm
http://publib.boulder.ibm.com/infocenter/wbihelp/topic/com.ibm.etools.mft.doc/ad06130_.htm
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 copy book REDEFINES question
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.