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, example05.cbl.
COBOL Statement |
Description |
---|---|
Move … Time-Stamp. |
Populate the Time-Stamp field. |
XML EXPORT TEXT Address-Struct Document-Pointer Document-Length "Address-Struct". |
Execute the XML EXPORT TEXT statement specifying: the data item address, the XML document text pointer, the XML document text length, 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 structure contains no data. |
XML IMPORT TEXT Address-Struct Document-Pointer Document-Length "Address-Struct". |
Execute the XML IMPORT TEXT statement specifying: the data item address, the XML document text pointer, the XML document text length, 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 PUT TEXT Document-Pointer Document-Length "address05". |
Execute the XML PUT TEXT statement specifying: the XML document text pointer the XML document text length, and the XML document filename. |
If Not XML-OK Go To Z. |
If the statement terminates unsuccessfully, go to the termination logic. |