IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Singe XML GENERATE statement for all copy books


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Thamilselvi

New User


Joined: 22 Jun 2012
Posts: 57
Location: Chennai

PostPosted: Thu Jul 26, 2012 9:53 am
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8573
Location: Dubuque, Iowa, USA

PostPosted: Thu Jul 26, 2012 4:46 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Thu Jul 26, 2012 7:29 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts SYNCSORT/ICETOOL JOINKEYS SORT Statem... DFSORT/ICETOOL 13
This topic is locked: you cannot edit posts or make replies. include and copy COBOL Programming 4
No new posts DFDSS COPY using Filter REFDT statement JCL & VSAM 2
No new posts tso copy in the foreground TSO/ISPF 12
No new posts SKIP LOCKED DATA in UPDATE statement DB2 9
Search our Forums:

Back to Top