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 » MRM with COBOL occurs depending on

Post new topic  Reply to topic
 MRM with COBOL occurs depending on « View previous topic :: View next topic » 
Author Message
shassey
PostPosted: Fri Jan 04, 2002 6:56 am    Post subject: Reply with quote

Apprentice

Joined: 25 Dec 2001
Posts: 25
Location: shassey

I am trying to define a legacy COBOL copybook using the repeat and value of to handle occurs depending on in legacy data. When I define the MRM with a fixed record length (repeat count no) and I pad the MRM out to the maximum length, I can read the message. Now I change this to repeat and value of so I that I can test to see if the repeat works - I also remove the padding because some of the data can occur from 1 to 100 times, I get an error saying my message stream is longer than my definition. How do you handle defining the message set with repeat and value of and make it so the message can be read? It seems like it needs to know the exact record length but you can't know the exact record length with occurs depending on?

Thanks

T
Back to top
View user's profile Send private message
Segs
PostPosted: Sat Jan 05, 2002 9:20 am    Post subject: Reply with quote

Voyager

Joined: 04 Oct 2001
Posts: 78
Location: Zurich Financial Services

I've just done this for a project here. I used this as an example to get the hang of things before doing it for real. Import this copybook into a message set, and then in the msg flow just loop round for the value of the count.

01 INPUT-RECORD.
03 LINE-ITEM-COUNT PIC 99.
03 LINE-ITEMS OCCURS 0 TO 25 TIMES
DEPENDING ON LINE-ITEM-COUNT.
05 QTY PIC 9999.
05 DESC PIC X(30).

Don't worry about the upper limit on the occurs this does not effect the record in the MRM.

Any queries please shout.

Segs...
Back to top
View user's profile Send private message Send e-mail
bnewman18
PostPosted: Thu Mar 07, 2002 11:08 am    Post subject: Reply with quote

Newbie

Joined: 06 Mar 2002
Posts: 5

Will the solution that you propose also work for a flat file that has different record sets which make up one message, while the message still contains multiple messages?
Now I'll make sense of that statement.
I have a flat file which contains multiple messages. Each message however is made up of different "record numbers" appended to the front of each row. And these record numbers can appear multiple times.
Example: In the below message I want to parse rows 1-5 and create an xml message. Each row is 600 bytes, but the field lengths of each row are different. Can a cobol copybook properly defined help me? Thanks.

1<amount><name><some other stuff>
2<ponumber><some other stuff>
3<partner><some other stuff>
4<location><some other stuff>
5<details>
5<details>
1<amount><name><some other stuff>
2<ponumber><some other stuff>
3<partner><some other stuff>
4<location><some other stuff>
5<details>
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 » MRM with COBOL occurs depending on
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.