The following tables show COBOL statements that relate to performing XML Extensions statements. Some COBOL statements (mostly the DISPLAY statements) have been omitted. The source of this example is in the file, example02.cbl.
COBOL Statement |
Description |
---|---|
Move … To Time-Stamp. |
Populate the Time-Stamp field. |
XML EXPORT FILE Address-Struct "address02.xml" "Address-Struct" "toext". |
Execute the XML EXPORT FILE statement specifying: the data item address, the XML document filename, the ModelFileName#DataFileName parameter value, and the external XSLT stylesheet name. |
If Not XML-OK Go To Z. |
If the statement terminates unsuccessfully, go to the termination logic. |
COBOL Statement |
Description |
---|---|
Initialize Address-Struct. |
Ensure that the Address-Struct structure contains no data. |
XML IMPORT FILE Address-Struct "address02.xml" "Address-Struct" "toint". |
Execute the XML IMPORT FILE statement specifying: the data item address, the XML document filename, the ModelFileName#DataFileName parameter value, and the external XSLT stylesheet name. |
If Not XML-OK Go To Z. |
If the statement terminates unsuccessfully, go to the termination logic. |
COBOL Statement |
Description |
---|---|
Z. |
Paragraph-name that is a target of error condition GO TO statements. |
Copy "lixmltrm.cpy". |
Copy in the termination test logic (see the Termination Test Logic table). |
Stop Run. |
Terminate the COBOL program. |
Copy "lixmldsp.cpy". |
Copy in the status display logic (see the Status Display Logic table). |