|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to map "OCCURS" in copybook |
« View previous topic :: View next topic » |
Author |
Message
|
wbi_telecom |
Posted: Thu May 04, 2006 12:22 pm Post subject: How to map "OCCURS" in copybook |
|
|
 Disciple
Joined: 15 Feb 2006 Posts: 188 Location: Harrisburg, PA
|
I am working with WBI 6.0 and trying to transform an XML message into COBOL copybook. I am using a mapping node to achieive the transformation. I need some guidence on how to map the "OCCURS" fields in the copy books. I tried looking into documentation but could not find anything so any help is highly appreciated.
Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 04, 2006 3:32 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
"OCCURS" is mostly a "repeat count".
It dpeends, though, a bit on the full OCCURs statement.
Rather than trying to understand the Copybook, you might talk to the COBOL people who use the Copybook and see if they can explain to you what the DATA looks like - at a higher level than the format. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wbi_telecom |
Posted: Fri May 05, 2006 3:49 am Post subject: |
|
|
 Disciple
Joined: 15 Feb 2006 Posts: 188 Location: Harrisburg, PA
|
Yes. OCCURs is the repeat count and that's where I need some help. The copybook I am dealing with has a header and the detiails portion repeats for "n" times, "n" depending on a value in a header field (for a maximum of 125 times.)
In earlier days (in WMQI 2.1) I used to initailise the fields in the compute node (compute node used to give me all the fields in the message set on top ) and then loop it through to get/put the values.
Now in mapping node, I am able to see only one occurence od the fields in "OCCURS" for mapping and want to know how would I loop it through the fields to put the next set of values. Do I have to use the expression editor? how?
Cheers, |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri May 05, 2006 8:50 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
wbi_telecom wrote: |
Yes. OCCURs is the repeat count and that's where I need some help. The copybook I am dealing with has a header and the detiails portion repeats for "n" times, "n" depending on a value in a header field (for a maximum of 125 times.)
In earlier days (in WMQI 2.1) I used to initailise the fields in the compute node (compute node used to give me all the fields in the message set on top ) and then loop it through to get/put the values.
Now in mapping node, I am able to see only one occurence od the fields in "OCCURS" for mapping and want to know how would I loop it through the fields to put the next set of values. Do I have to use the expression editor? how?
Cheers, |
We map the fields from the occurs to a section that has 0, unbounded.
Just map once and you will see the "for" appear in the mapping node (lower part)
That will take care of the repetition.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
wbi_telecom |
Posted: Mon May 08, 2006 9:40 am Post subject: |
|
|
 Disciple
Joined: 15 Feb 2006 Posts: 188 Location: Harrisburg, PA
|
Thanks!! That worked for me.
Cheers, |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|