System Design

Rather than designing an entire system, we are actually designing a data pipeline that will permit information to flow to and from the existing legacy COBOL applications. Figure 17.1 shows the flow of information between the Internet ordering system and the legacy mainframe applications.

Figure 17.1. The Internet/legacy order processing data flow.


Based on this data flow, these are the items that need to be designed and developed:

  • The daily order XML to flat-file conversion process.

  • The mainframe inventory XML export process.

Also, because there is no real “mainframe” in our scenario, we will develop utilities to simulate the actions that would be performed by the legacy system in a real application.

Converting XML to a Flat-File Format

The documentation we were given for the mainframe daily order update application shows us the actual flat-file format expected by that utility. Figure 17.2 shows the column layout and format of the expected daily update file.

Figure 17.2. The daily update file format.


The XML document that will be used to generate this file can be found in OrderDB.xml. This document is the same as the document that is created by the offline order processing system that is built in Chapter 14, “Offline Order Processing Using Store-and-Forward.” To generate a flat-file format from the XML document, we will use the text output method of XSLT.

Generating XML from COBOL

To close the data loop between the mainframe and the Internet-based ordering system, it is necessary to export the contents of the inventory database in XML format. If the data were stored in a fixed-width flat file on the mainframe, simply downloading the file and using data transformation tools such as Microsoft DTS might be an option.

Unfortunately, because this database is stored as an indexed file, the file format itself is opaque to non-COBOL applications. Most COBOL compilers use a proprietary Indexed/Sequential Access Method (ISAM) format for storing and retrieving data in indexed files. Therefore, writing a COBOL program to retrieve the data records and write them as an XML document is the safest and simplest solution.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.87.235