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, example09.cbl.
COBOL Statement | Description |
---|---|
XML INITIALIZE. |
Execute the XML INITIALIZE statement (no parameters). |
If Not XML-OK Go To Z. |
If the statement terminates unsuccessfully, go to the termination logic. |
COBOL Statement | Description |
---|---|
Move … To Time-Stamp. |
Populate the Time-Stamp field. |
XML EXPORT FILE Address-Struct "address09a" "Address-Struct". |
Execute the XML EXPORT FILE statement specifying: the data item address, the XML document filename, and the ModelFileName#DataFileName parameter value. |
If Not XML-OK Go To Z. |
If the statement terminates unsuccessfully, go to the termination logic. |
COBOL Statement | Description |
---|---|
XML TRANSFORM FILE "address09a" "toext" "address09b". |
Execute the XML TRANSFORM FILE statement specifying: the input XML document filename, the XSLT stylesheet filename, and the output XML document filename. |
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 item contains no data. |
XML TRANSFORM FILE "address09b" "toint" "address09c". |
Execute the XML TRANSFORM FILE statement specifying: the input XML document filename, the XSLT stylesheet filename, and the output XML document filename. |
If Not XML-OK Go To Z. |
If the statement terminates unsuccessfully, go to the termination logic. |
COBOL Statement | Description |
---|---|
XML IMPORT FILE Address-Struct "address09c" "Address-Struct". |
Execute the XML IMPORT FILE statement specifying: the data item address, the XML document filename, and the ModelFileName#DataFileName parameter value. |
If Not XML-OK Go To Z. |
If the statement terminates unsuccessfully, go to the termination logic. |
COBOL Statement | Description |
---|---|
XML TRANSFORM FILE "address09c" "example09" "address09d ". |
Execute the XML TRANSFORM FILE statement specifying: the input XML document filename, the XSLT stylesheet filename, and the output XML document filename. |
If Not XML-OK Go To Z. |
If the statement terminates unsuccessfully, go to the termination logic. |
Same as example 1.
Same as example 1.
Same as example 1.