Author |
Message
|
paustin_ours |
Posted: Thu Feb 12, 2015 7:57 am Post subject: message definition file |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
i have created a message definition fil eusing a copy book. Then i have altered a lot of elements to add lenght depends on other element etc.,
now is there a way to generate a copybook from this altered .mxsd file?
or would a better wya to do this would be to create a xml schema using this .mxsd file (which i assume is just a .xsd file) and then use this schema to create new message set if needed? |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Feb 12, 2015 8:05 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
The better way would be to alter the copybook and then re-import it...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
shanson |
Posted: Thu Feb 12, 2015 10:07 am Post subject: |
|
|
 Partisan
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
|
There is no way provided to generate a COBOL copybook from a message set or from a DFDL library. The COBOL -> schema process is a lossy conversion and it is not always possible to generate the desired COBOL. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Feb 12, 2015 1:42 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
...or would a better way to do this would be to create a xml schema using this .mxsd file |
Can you define 'this'. What exactly are you trying to achieve? _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
paustin_ours |
Posted: Tue Feb 17, 2015 5:10 am Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
let me try, i import a copybook and then some of the fileds i set it the lenght reference to another field so that the length of one field is the value of the other field. Now i am no cobol expert but not sure how to set these conditions on the copybook so that next time someone wants to use the copybook to generate a message set, they wont have to then again manually change the length fields. this would be possible if i could somehow generate a copybook after i make the length changes and anything else in the message set properties. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Feb 17, 2015 5:43 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
How about redefines and depending cobol key words? And then there is the 88 level....  _________________ MQ & Broker admin |
|
Back to top |
|
 |
paustin_ours |
Posted: Tue Feb 17, 2015 6:10 am Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
like I said am no cobol expert but i will read about this. Thanks. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Feb 17, 2015 6:40 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
paustin_ours wrote: |
like I said am no cobol expert but i will read about this. Thanks. |
Be aware that the COBOL DEPENDING ON clause refers to the number of elements in an array, not the length of a given field. Likewise a REDEFINES only redfines the fixed length elements.
COBOL does not support the concept of variable length fields via the PICTURE clause, only variable length records (where the total record length varies because of 1-n variable arrays)
If you could generate COBOL copybooks with new PICTURE clauses the way you describe, most COBOL developers would not thank you. The COBOL style and faciltities (e.g. field validation) are based on fixed length elements & you'd introduce a fair amount of rework.
I wrote COBOL for 15 years before IBM invented MQ and gave me a more lucrative way of earning a living. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Tue Feb 17, 2015 7:46 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Vitor wrote: |
I wrote COBOL for 15 years before IBM invented MQ and gave me a more lucrative way of earning a living. |
I learnt PL/1 - which also has some history at Hursley.
Although I never did really understand what PL/1 was doing with my storage until I learnt Assembler.
My favourite was REXX (definitely from Hursley!).
I suspect ESQL takes after both PL/1 and REXX a little bit.
Then the Devil invented the cryptic Java language complete with null pointers.. _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Feb 17, 2015 8:31 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
zpat wrote: |
Vitor wrote: |
I wrote COBOL for 15 years before IBM invented MQ and gave me a more lucrative way of earning a living. |
I learnt PL/1 - which also has some history at Hursley. |
I wrote PL/1 before I wrote COBOL.
zpat wrote: |
Although I never did really understand what PL/1 was doing with my storage until I learnt Assembler. |
I never cared much - I had a compiler that managed storage for me...
zpat wrote: |
Then the Devil invented the cryptic Java language complete with null pointers.. |
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|