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 » How to map "OCCURS" in copybook

Post new topic  Reply to topic
 How to map "OCCURS" in copybook « View previous topic :: View next topic » 
Author Message
wbi_telecom
PostPosted: Thu May 04, 2006 12:22 pm    Post subject: How to map "OCCURS" in copybook Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Thu May 04, 2006 3:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
wbi_telecom
PostPosted: Fri May 05, 2006 3:49 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Fri May 05, 2006 8:50 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
wbi_telecom
PostPosted: Mon May 08, 2006 9:40 am    Post subject: Reply with quote

Disciple

Joined: 15 Feb 2006
Posts: 188
Location: Harrisburg, PA

Thanks!! That worked for me.

Cheers,
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 » How to map "OCCURS" in copybook
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.