This tool analyzes the compiler's error feedback file, and adds the messages to the Error Feedback view.
Parameter # | I/O | Type | Description |
---|---|---|---|
1 [M] | I | file | References the Error Feedback XML file created by a compiler or a tool that transforms the compiler output into the required XML format. |
The XML format interpreted by AMW is a subset of the standard XML format supported by the IBM Enterprise PL/I compiler's XML option.
The following shows the XML schema for the error feedback file:
<?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="FILENUMBER" type="xsd:string" /> <xsd:element name="PACKAGE"> <xsd:complexType> <xsd:sequence> <xsd:element ref="FILEREFERENCETABLE" maxOccurs="1" minOccurs="1" /> <xsd:element ref="MSGTABLE" maxOccurs="1" minOccurs="1" /> <xsd:element ref="MSGTABLE" maxOccurs="1" minOccurs="1" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="FILENAME" type="xsd:string" /> <xsd:element name="MSGTABLE"> <xsd:complexType> <xsd:sequence> <xsd:element ref="MESSAGE" maxOccurs="unbounded" minOccurs="0" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="MESSAGE"> <xsd:complexType> <xsd:sequence> <xsd:element ref="MSGNUMBER" maxOccurs="1" minOccurs="1" /> <xsd:element ref="MSGLINE" maxOccurs="1" minOccurs="1" /> <xsd:element ref="MSGFILE" maxOccurs="1" minOccurs="1" /> <xsd:element ref="MSGTEXT" maxOccurs="1" minOccurs="1" /> <xsd:element ref="CUSTOMATTRIBUTES" minOccurs="0" maxOccurs="1" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="MSGNUMBER" type="xsd:string" /> <xsd:element name="MSGTEXT" type="xsd:string" /> <xsd:element name="FILECOUNT" type="xsd:string" /> <xsd:element name="OUTFILENAME" type="xsd:string" /> <xsd:element name="MSGLINE" type="xsd:string" /> <xsd:element name="FILE"> <xsd:complexType> <xsd:sequence> <xsd:element ref="FILENUMBER" maxOccurs="1" minOccurs="1" /> <xsd:element ref="FILENAME" maxOccurs="1" minOccurs="1" /> <xsd:element ref="CUSTOMATTRIBUTES" minOccurs="0" maxOccurs="1" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="MSGFILE" type="xsd:string" /> <xsd:element name="FILEREFERENCETABLE"> <xsd:complexType> <xsd:sequence> <xsd:element ref="FILECOUNT" maxOccurs="1" minOccurs="1" /> <xsd:element maxOccurs="unbounded" ref="FILE" minOccurs="1" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="CUSTOMATTRIBUTES" /> </xsd:schema>
The error feedback file contains the following tags:
XML tag | Description |
---|---|
PACKAGE | An encompassing tag for the file reference and message table. |
FILEREFERENCETABLE | An encompassing tag which describes the files used during compiling. |
MSGTABLE | An encompassing tag which describes the messages created during compiling. |
FILECOUNT | Describes the number of files that were used during processing. |
FILE | Describes an individual file that is used during compiling. |
FILENUMBER | Describes the number assigned to the input file by the compiler. |
FILENAME | The name of the file used during the processing. It is the name of the file that corresponds with the FILENUMBER tag. |
MESSAGE | Describes a message that is produced by the compiler. |
MSGNUMBER | Describes the message number of the message that was produced by the compiler. |
MSGLINE | Describes the line in the input file that caused the compiler to produce the message. |
MSGFILE | Describes the file number of the input file that caused the compiler to produce the message. |
MSGTEXT | The text of the message that is produced by the compiler. |
CUSTOMATTRIBUTES | Additional attributes that can be added to the error feedback XML file. The values of the custom attributes are only accessible through the API. See the IErrorFeedbackEntry interface of the ‘com.microfocus.awm.model’ package. |
<PACKAGE> <FILEREFERENCETABLE> <FILECOUNT>01</FILECOUNT> <FILE> <FILENUMBER>01</FILENUMBER> <FILENAME>c:\microfocus\esd\BANKPROD\Sources\cbl\ZBANKULP.CBL</FILENAME> </FILE> </FILEREFERENCETABLE> <MSGTABLE> <MESSAGE> <MSGNUMBER>COBCH0071 S</MSGNUMBER> <MSGLINE>12</MSGLINE> <MSGFILE>01</MSGFILE> <MSGTEXT>PROCEDURE DIVISION missing or unknown statement</MSGTEXT> </MESSAGE> </MSGTABLE> </PACKAGE>
The <CUSTOMATTRIBUTES> tag can be used to add additional information in the error feedback XML file. The <CUSTOMATTRIBUTES> element can either been defined between the <FILE></FILE> or <MESSAGE></MESSAGE> element in an error feedback XML file.
Parsed custom attributes are added to the corresponding IErrorFeedbackEntry's. The values of the custom attributes can be accessed through the API. See the IErrorFeedbackEntry interface of the ‘com.microfocus.awm.model’ package.
<PACKAGE> <FILEREFERENCETABLE> <FILECOUNT>01</FILECOUNT> <FILE> <FILENUMBER>01</FILENUMBER> <FILENAME>c:\microfocus\esd\BANKPROD\Sources\cbl\ZBANKULP.CBL </FILENAME> <CUSTOMATTRIBUTES canEdit="true" group="dev2" /> </FILE> </FILEREFERENCETABLE> <MSGTABLE> <MESSAGE> <MSGNUMBER>COBCH0071 S</MSGNUMBER> <MSGLINE>12</MSGLINE> <MSGFILE>01</MSGFILE> <MSGTEXT>PROCEDURE DIVISION missing or unknown statement</MSGTEXT> </MESSAGE> </MSGTABLE> </PACKAGE>
<PACKAGE> <FILEREFERENCETABLE> <FILECOUNT>2</FILECOUNT> <FILE> <FILENUMBER>1</FILENUMBER> <FILENAME>SCLM.DEV1.SOURCE(TESTUP3)</FILENAME> </FILE> <FILE> <FILENUMBER>2</FILENUMBER> <FILENAME>SCLM.DEV1.SOURCE(TESTCPY1)</FILENAME> </FILE> </FILEREFERENCETABLE> <MSGTABLE> <MESSAGE> <MSGNUMBER>IGYGR1080 S</MSGNUMBER> <MSGLINE>2</MSGLINE> <MSGFILE>2</MSGFILE> <MSGTEXT>A "VALUE" clause literal was not compatible with the data category of the subject data item. The "VALUE" clause was discarded.</MSGTEXT> </MESSAGE> <MESSAGE> <MSGNUMBER>IGYPS0037 S</MSGNUMBER> <MSGLINE>27</MSGLINE> <MSGFILE>1</MSGFILE> <MSGTEXT>"ERG" was not a uniquely defined name. The definition to be used could not be determined from the context. The reference to the name was discarded. </MSGTEXT> </MESSAGE> </MSGTABLE> </PACKAGE>