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: 8697
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: 6966
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 VB to VB copy - Full length reached SYNCSORT 8
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts DB2 Table - Image copy unload IBM Tools 2
Search our Forums:

Back to Top