X hits on this document

387 views

0 shares

0 downloads

0 comments

102 / 120

  • 7)

    Write a COBOL program XML2CALC.cbl which:

    • a)

      Marshalls XML received from the Java2CblXmlBridge.cpp, based on the XML Schema created in Step 2, into SMPLCALC-INTERFACE.

    • b)

      Invokes SMPLCALC.cbl, passing SMPLCALC-INTERFACE by reference.

    • c)

      Marshalls SMPLCALC-INTERFACE back into XML document before returning to Java2CblXmlBridge.cpp.

Using the recently added XML support in COBOL [37, 44], parsing and

generation of XML is fairly straight-forward. Two statements in the COBOL language,

XML PARSE and XML GENERATE, are used to implement the program

XML2CALC.cbl. Note that the XML GENERATE statement only allows assignment of

non-default XML element names to data structure members when reading or writing from

an XML file. Since we are working with XML in a stream, the XML Schema defined in

the solution to Step 2 uses the default XML element names generated by the Micro Focus

Net Express CBL2XML wizard. Table 9.8 gives the source code for XML2CALC.cbl, the

XML layer to the legacy COBOL application.

94

Document info
Document views387
Page views388
Page last viewedSat Dec 10 09:46:20 UTC 2016
Pages120
Paragraphs2913
Words25794

Comments