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, example03.cbl.
COBOL Statement |
Description |
---|---|
Move … To Time-Stamp. |
Populate the Time-Stamp field. |
Move 3 to Address-Lines. Move … to Address-Line(1). Move … to Address-Line(2). Move … to Address-Line(3). |
Ensure that Address Lines contain proper information. |
XML EXPORT FILE Address-Struct3 "address03.xml" "Address-Struct3". |
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-Struct3. |
Ensure that the address structure contains no data. |
XML IMPORT FILE Address-Struct3 "address03.xml" "Address-Struct3". |
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. |