Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Singe XML GENERATE statement for all copy books

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Singe XML GENERATE statement for all copy books
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: 7931
Location: Bellevue, IA

PostPosted: Thu Jul 26, 2012 4:46 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us