Previous Topic: The XML Report Data Document

Next Topic: XML Report Restrictions


XML Report Layout

All of the CA JARS XML reports are laid out similarly. At the very top is the tag indicating the XML version and page encoding. The second item in the report is the top group tag. The top group name in the report is the same as the report title on the HEADER card, although all of the spaces in the title are changed to underscores (_). In addition, the slash, less-than, and greater-than characters are changed to hyphens. XML does not allow these characters in tag names. The top group has two attributes: the schema standard that is being used and the location of the schema that was created at the same time as the report. The schema location is the data set name of the schema as allocated in the job that was run.

If you are running the XML writer and routing the schema to DUMMY or to print, the schema name reflects the system data set name that is assigned. If you are going to be processing the output XML with an application that requires a schema, you must produce the schema with every call, or add a step in the processing to replace the schema name with a reference to a pre-existing schema.

Following the top group tag is the REPORT_LINE tag, which delineates each report line in the report. Under the REPORT_LINE tags are the values of each column in a report, with the column header being used as the descriptive tag for the value. Again, spaces in the column headers are converted to underscores in the tag names.

Here is a sample XML report:

<?xml version="1.0" encoding="ibm-1047" ?>
<SAMPLE_XML_REPORT
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation=
  "//'LIVMI02.TEST.XMLLIB(XMLES)'">

<REPORT_LINE>
  <JOB_NAME>$RXQUMON</JOB_NAME>
  <USER_ID>STCSYS</USER_ID>
  <RDR_STRT_DATE>03/07/07</RDR_STRT_DATE>
  <RDR_STRT_TIME>19:26:14</RDR_STRT_TIME>
  <JOB_NBR> 00422</JOB_NBR>
  <CPU_TIME>  00:00:01</CPU_TIME>
  <CC>0000</CC>
  <ELAPSED_TIME>  01:00:01</ELAPSED_TIME>
  <PERCENT_TOTAL>   .000</PERCENT_TOTAL>
  <ELAP_PAGE>   0</ELAP_PAGE>
</REPORT_LINE>

<REPORT_LINE>
  <JOB_NAME>ABBCH02</JOB_NAME>
  <USER_ID>ABBCH02</USER_ID>
  <RDR_STRT_DATE>03/07/08</RDR_STRT_DATE>
  <RDR_STRT_TIME>10:30:01</RDR_STRT_TIME>
  <JOB_NBR></JOB_NBR>
  <CPU_TIME>  00:00:00</CPU_TIME>
  <CC>S622</CC>
  <ELAPSED_TIME>  00:01:53</ELAPSED_TIME>
  <PERCENT_TOTAL>   .000</PERCENT_TOTAL>
  <ELAP_PAGE>   0</ELAP_PAGE>
</REPORT_LINE>
</SAMPLE_XML_REPORT>

All CA JARS XML documents have a similar format. The header is present, indicating the version and encoding in the top line. The top group name is the same as the report title from the HEADER statement in the report, with all of the spaces converted to underscores (_), and the greater-than, less-than, and slash characters converted to hyphens. Beneath the top group are the individual lines of the report with the REPORT_LINE tag. Each tag beneath the line is the column header in the CA JARS report (again with the same substitutions as in the top group tag name.)