|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
PROBLEM WITH CWF ( OUTPUT MESSAGE) |
« View previous topic :: View next topic » |
Author |
Message
|
rajaram |
Posted: Mon Feb 16, 2004 4:04 am Post subject: PROBLEM WITH CWF ( OUTPUT MESSAGE) |
|
|
Acolyte
Joined: 02 Jan 2004 Posts: 53
|
Hi friends,
I have a output message set (a cobol copy book) with physical format CWF.
I have the following structure for the cobol COPY BOOK.
01 RECORD OCCURS 9999 TIMES.
02 ELM1 PIC X(5).
02 ELM2 PIC X(4).
02 ELM3 PIC X(4).
02 ELM4 PIC 9(2).
02 ELM5 PIC X(3).
02 ELM6 PIC 9(5).
02 ELM7 PIC X(54).
02 ELM8 PIC X(53).
02 ELM9 PIC X(15).
When, i import this copy book to my CONTROL CENTER, The min occurs,max occurs,repeat count values are set to 9999. Now, If i pass only 2 records to the output message set. It is throwing a CWF writing error. Suppose, if i change the min occurs and repeat count to 2 in the msg set, then if i pass 2 record it accepts. i.e., it is expecting the same no. of records as many as mentioned in the repeatcount and min occurs. My problem is i want to dynamically populate the output messageset based on the no. of Input records. Please give me some idea on how to handle this?
Thanks,
Raja |
|
Back to top |
|
 |
wooda |
Posted: Mon Feb 16, 2004 4:56 am Post subject: |
|
|
 Master
Joined: 21 Nov 2003 Posts: 265 Location: UK
|
There are currently only two possible variations if you have repeating elements in CWF
1.) Fixed number of repeats, defined in the messageset.
2.) Varaible number of repeats defined by another field in the message. Called "repeat value of" or "repeat reference".
In your model you wish to repeat a variable number of times without providing the count either dynamicaly or in the model.
This is not currently supported in CWF.
So you have two options.
1.) Input the message as a BLOB.
Inspect the length of the BLOB in ESQL to determine how many repeats of your fixed structure you have.
Insert an integer at the start of the BLOB to give the repeat count for RECORD.
Re-parse against an MRM messageset which is identical to what you have now but has an extra integer element outside RECORD and the repeat count of RECORD set to the "value of" this integer.
On output you'd need to serialise the message and then snip out the integer using ESQL before outputing the message.
2.) Use TDS, as long as the limitation that you cannot model binary encoded numeric fields or packed decimal will not stop you modelling your message(s). In TDS you would need to use the Data Pattern separtion technique for the message type with an unbounded number of repeats for RECORD.
I would go for option 1. |
|
Back to top |
|
 |
wooda |
Posted: Mon Feb 16, 2004 5:08 am Post subject: |
|
|
 Master
Joined: 21 Nov 2003 Posts: 265 Location: UK
|
By the way..
01 RECORD OCCURS 9999 TIMES
In COBOL this means that record always occurs 9999 times.
Which would seem to differ from the data in your input message. |
|
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
|
|
|
|