Author |
Message
|
berguss22 |
Posted: Tue Feb 08, 2005 2:50 am Post subject: Repeat Reference |
|
|
Apprentice
Joined: 10 Mar 2004 Posts: 31
|
I am converting from an XML Message to a CWF one of the Output fields is dependent in an integer in the input XML message How do I do that I mean dynamically determine the number of output fields |
|
Back to top |
|
 |
berguss22 |
Posted: Tue Feb 08, 2005 6:20 am Post subject: |
|
|
Apprentice
Joined: 10 Mar 2004 Posts: 31
|
let me elaborate more.
Im converting from XML to COBOL the no. of occurrences of one of the output message elements depends on an integer field in the XML input message. the output message is of fixed length. if I use Repeat Reference I have to define an integer field in the Output message and map it to the one in the input XML message but I dont want to do that since its not part of the COBOL structure I want.
Any suggestions |
|
Back to top |
|
 |
waugh |
Posted: Tue Feb 08, 2005 6:36 am Post subject: |
|
|
 Master
Joined: 19 Feb 2004 Posts: 225
|
is that repeating element always the last element? can they send it as last element?
if yes, you can just define it as complex element with max. occurences from the requirements. |
|
Back to top |
|
 |
berguss22 |
Posted: Tue Feb 08, 2005 6:40 am Post subject: |
|
|
Apprentice
Joined: 10 Mar 2004 Posts: 31
|
its not the last element No |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Feb 08, 2005 7:49 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Do you *have* to model your cobol structure with CWF?
If so, this is what I've done in a similar situation: Model the data including the extra field. Convert the transformed data to a BLOB section. Use SUBSTRING on the BLOB field to remove the extra field. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
berguss22 |
Posted: Tue Feb 08, 2005 7:54 am Post subject: |
|
|
Apprentice
Joined: 10 Mar 2004 Posts: 31
|
OK and then I transfer it from BLOB to CWF right without the extra field??? |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Feb 08, 2005 8:06 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
No. You just put it on the queue as BLOB.
You can't model it successfully in CWF without the repeat count field. So you can't put it back to CWF after you've removed that field - which is your final output format, right? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
berguss22 |
Posted: Tue Feb 08, 2005 8:12 am Post subject: |
|
|
Apprentice
Joined: 10 Mar 2004 Posts: 31
|
I truely appreciate ur help. Any way my final message format should be in CWF without that extra field because Im sending it to the Backend running on OS390 u know as a String I believe can I still do that in BLOB |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Feb 08, 2005 8:23 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Once a CWF message is written to the queue, it's been turned into a block of bytes - which is a BLOB. So all you're doing is making that happen a little early and then tweaking the contents.
So yes, it will work. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
berguss22 |
Posted: Tue Feb 08, 2005 8:25 am Post subject: |
|
|
Apprentice
Joined: 10 Mar 2004 Posts: 31
|
|
Back to top |
|
 |
|