Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Receiving extensible markup language (XML) output data in the XML output buffer z/OS DFSMSrmm Application Programming Interface SC23-6872-00 |
|
Use the high-level language application programming interface to obtain output in XML format. The XML output may also return error messages and return and reason codes. Figure 1 shows an example that issues an RMM SEARCHRACK subcommand and writes the XML output into the file named XMLFILE. You can work with the output data in XML format by writing the output into a file or by parsing the output directly. You can define this file in the JCL, which you use to issue the command. This example shows in C++ code how to:
Figure 1. C++ code example for writing XML
output to a file
Figure 2 shows the content of
the file XMLFILE.
Figure 2. XMLFILE output file
Most of the DFSMSrmm-produced XML tags use the SFI names described
in Table 1. For example,
the XML tag for volume is <VOL>, which corresponds to the SFI name
VOL. The DFSMSrmm-produced XML tags that do not use the SFI names
are these tags.
The XML output structure is declared in the XML schema file RMMXML.XSD, that you find in your file system directory /usr/lib/xml_schema. The schema contains type definitions for all elements. The XML data stream contains a Uniform Resource Identifier (URI) to reference the required schema. To change the schema location, use the XML parser setExternalnoNamespaceSchemaLocation method. DFSMSrmm ensures it creates only well-formed and valid XML documents
and ensures that any text within an element contains only valid characters.
The special characters &, <, >, ", and ' are escaped using
the entities:
Related reading: You can write your own application
to parse the XML data by using the XML parser. IBM® provides an XML parser and sample applications
in the XML Toolkit for z/OS® available at http://www.ibm.com/zseries/software/xml or from the IBM Software Delivery for System
Modification Program Extended (SMP/E) installation.
|
Copyright IBM Corporation 1990, 2014
|