Joined: 06 Jun 2008 Posts: 8218 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.