|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Field length when importing Cobol Copybooks to MRM? |
« View previous topic :: View next topic » |
Author |
Message
|
BrisVegas |
Posted: Sun Jul 24, 2005 8:41 pm Post subject: Field length when importing Cobol Copybooks to MRM? |
|
|
Novice
Joined: 05 Aug 2004 Posts: 14 Location: Brisbane, Australia
|
Hi all,
Just wondering whether it's possible to NOT specify field length for PIC X & PIC 9 fields when importing Cobol copybooks.
I've built MRM messages manually in the past and added the TDF layer for typical comma separated records. In this case, the records contain hundreds of fields (curse JDEdwards!), so the only expedient way to load them was to build copybooks and use the CWF layer. As far as I know at least?
The problem I have now is that the parser rejects incoming messages if there is any mismatch between expeced and actual field lengths. I'd prefer if I could avoid such harsh validation.
Any help would be greatly appreciated, thanks... |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jul 25, 2005 3:36 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Don't use CWF if it's not an appropriate model. This decision should be made based on the data's complexity - can it be modeled by CWF or does it have to be TDS or something else?
But that's a separate question.
You can create a message definition file from all sorts of things - maybe using an XML Schema is a better choice for you. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kimbert |
Posted: Mon Jul 25, 2005 6:49 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
I think Jeff's got the right idea. COBOL does not have the concept of variable-length fields, so the COBOL you are constructing for the purposes of importing your definitions is too restrictive. It should be pretty simple to create an XML schema which does the same thing.
There's no way to switch off the length validation, by the way. |
|
Back to top |
|
 |
BrisVegas |
Posted: Mon Jul 25, 2005 8:02 pm Post subject: |
|
|
Novice
Joined: 05 Aug 2004 Posts: 14 Location: Brisbane, Australia
|
Field length is quite important to the customer when data is loaded back into their system. However, they're having a problem getting the numeric fields out of their system in the lengths that they've specified, ie. 7 digits, 12 digits etc. All of their numerics are coming through as 32 digits, including 10 decimal places (no idea why?) and zero-filled if null.
Trouble was, I'd built the message set based on what was "supposed" to be coming out. Fortunately, today they've agreed to fix the data at their end before sending it in to me, so the lengths should no longer be an issue.
....
I still don't know if I'm doing all of this the "right" way. The data comes in fairly simple, albeit large, CSV records with an identifier in the first character to denote the type of record, eg.
1,abc,123,abd,1233,,,,,,, (Header info)
2,456,def,456,,,,,,, (Additional Header info)
3,789,abc,defghtyi,97.50 (Item)
3,789,abc,defghtyi,65.00 (Item)
3,789,abc,defghtyi,110.99 (Item)
4,Buyer,Fred Smith,,,City,State,Zip,,,,fred@buyer.com,,,, (address info)
4,Seller,Joe Bloggs,,,City,State,Zip,,,,joe@seller.com,,,, (address info)
I loaded the various record types using Cobol Copybooks & CWF layer, then added a TDF layer to describe the tag data separation, delimeters, tags, end of record indicators etc. In the MQSI flows I only refer to the TDF layer. It seems to work... Is there a better way? If they were really small record structures, I wouldn't need to use the CWF layer as I could manually create the elements, types and messages. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Jul 26, 2005 12:52 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
I think your solution is a reasonable way to avoid hand-crafting the message set. You might be able to avoid some warnings/errors in the task bar by deleting the redundant CWF physical format. |
|
Back to top |
|
 |
BrisVegas |
Posted: Tue Jul 26, 2005 3:03 pm Post subject: |
|
|
Novice
Joined: 05 Aug 2004 Posts: 14 Location: Brisbane, Australia
|
kimbert wrote: |
I think your solution is a reasonable way to avoid hand-crafting the message set. You might be able to avoid some warnings/errors in the task bar by deleting the redundant CWF physical format. |
I can't see any way of removing the CWF layer? I'm using MQSI 2.1 though, so maybe it's not possible in this version. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jul 27, 2005 12:45 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Correct. You can't remove a wire format in v2.1. I should have checked what version you were using before offering that advice. |
|
Back to top |
|
 |
BrisVegas |
Posted: Wed Jul 27, 2005 1:25 pm Post subject: |
|
|
Novice
Joined: 05 Aug 2004 Posts: 14 Location: Brisbane, Australia
|
kimbert wrote: |
Correct. You can't remove a wire format in v2.1. I should have checked what version you were using before offering that advice. |
No problems. Thanks for the help. We're moving to v.5 shortly, so that'll be another useful new feature. |
|
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
|
|
|
|