Program structure for example 11

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, example11.cbl.

Initialization

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
 "address11"
 "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
Initialize Address-Struct.
Ensure that the address item is initialized.
XML IMPORT FILE
 Address-Struct
 "address11"
 "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
Initialize Address-Struct.
Ensure that the address item is initialized.
XML IMPORT FILE
 Address-Struct
 "x-address11"
 "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.

Program exit logic

Same as example 1.

Termination test logic

Same as example 1.

Status display logic

Same as example 1.