Redefined Fields

COBOL specifically supports a REDEFINES clause, similar to a union in C. I'm not sure of the advantages of supporting this feature, but I'm also sure that someone might think of some. For example, supporting REDEFINES might be attractive to people who want to develop file description documents directly from COBOL copybooks. I've not tested it but I see no reason why the FlatToXML converter couldn't support redefined fields right now. The XMLToFlat converter might also support the feature, but if it does it would, in essence, write out and overlay the redefined bytes once for each redefinition. I see no advantage in that!

Get Using XML with Legacy Business Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.