View previous topic :: View next topic
|
Author |
Message |
Thamilselvi
New User
Joined: 22 Jun 2012 Posts: 57 Location: Chennai
|
|
|
|
Hi ,
I am able to create XML message for specific COBOL copybooks like below.
XML GENERATE XML-GEN-DOCUMENT FROM EMPLOYEE-DETAILS
But, my requirement is need to generate XML for different copybooks. Instead writting separate XML GENERATE statement for each copybook, how to write a singe XML GENERATE statement for all copy books.
Requirements: Need to create XML message for each & every response from mainframe to client through MQ using COBOL. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Terminology is critical in IT, where similar terms may mean very different things. You cannot "generate XML for different copybooks" since a copybook is source code -- either data definitions or procedural code -- and a copybook cannot be recognized once the program is compiled; the source is incorporated into the program and the load module cannot tell which code came from the program and which came from the copybook.
Further, why not just use XML GENERATE as required? From what you have posted so far, there should be no problem creating 1 ... 7 ... 319 XML GENERATE statements in your code and invoking the correct one depending upon the data, unless there's more you haven't told us. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
sounds as if you want dynamic xml generation.
during the compile process the xml generate statement
e.g.:
XML GENERATE XML-GEN-DOCUMENT FROM EMPLOYEE-DETAILS
generates the needed code to manipulate each field of
EMPLOYEE-DETAILS (source structure).
your time would be best served in attempting
to 'normalize your messages',
so that they all fit in the same 'source structure'. |
|
Back to top |
|
|
|