Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


The content of XML-CODE

When the parser returns control to your XML PARSE statement, special register XML-CODE contains the most recent value that was set by the parser or by your processing procedure.

For each event except the EXCEPTION event, the value of XML-CODE is zero. If you set XML-CODE to -1 before you return control to the XML parser for an event other than EXCEPTION, processing stops with a user-initiated exception (as indicated by the returned XML-CODE value of -1). The result of changing XML-CODE to any other nonzero value before returning from any event is undefined.

For the EXCEPTION event, special register XML-CODE contains the exception code.

The following figure shows the flow of control between the parser and your processing procedure and shows how XML-CODE is used to pass information between them. The off-page connectors (for example, Off-page flow-chart connector.) connect the multiple charts in this information. In particular, E off-page connector. in the following figure connects to the chart Control flow for XML exceptions, and P off-page connector. connects from XML CCSID exception flow control.

Control flow between XML parser and program, showing XML-CODE usage

Flow chart of control flow between XML parser and program with XML-CODE usage, which is described in surrounding text.

related concepts
The content of XML-TEXT and XML-NTEXT

related tasks
Writing procedures to process XML
Handling exceptions that the XML parser finds

related references
Appendix F. XML reference material
XML-CODE (COBOL for Windows Language Reference)


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)