COBOL with a Touch of Legacy

Looking at the Year 2000 and Beyond

By Wilbert T. Kho, IBM

Current State of Affairs

he past decade has ushered Information Technology (IT) into many boardrooms where it now plays a more prominent role in adding to the bottom line. The globalization of the marketplace, brought about by rapid advances in technology, has created a very dynamic, competitive environment where the fleetest in responding to changing market forces wins. Often, the fleetest also needs to be the smartest, specially in the adoption and leverage of new technology to meet business needs and accomplish business ends.

The approach of the next millenium, a.k.a. Year 2000, has renewed interest in so called computer legacy systems, many of which are used in operational and tactical activities of companies. The current focus is on the Year 2000 problem, where years represented as two digits would lead to incorrect calculations and thus disrupt the operations of companies. As company resources, financial and human, are finite, the pressing requirement to fix the Year 2000 problem will only divert these resources from attending to strategic needs.

As the Gartner group and others have estimated, a major proportion of these legacy systems is written in COBOL. This means enterprises with this characteristic in their application portfolio need to invest resources that are capable of dealing with their inventory of COBOL applications. The associated financial impact to these organizations can be considerable, potentially affecting the viability of some companies. Ignoring the problem is not a good option because operational disruptions to these businesses resulting from the Year 2000 problem can threaten their very survival.

As is oft stated in any press or trade journal article on Year 2000, the clock is ticking! There is nothing to be gained by waiting. No silver bullet or magic wand is going to appear that will allow one to effortlessly fix the problem. In addition, COBOL resources are getting scarcer as the next millenium approaches; thus, time is of the essence, and it is critical for those companies that have not even ventured a look into this arena to start working on it now.

What options do IT organizations with mainframe (host) COBOL applications have in dealing with this issue? IBM recently announced the VisualAge 2000 offering that provides its customers with tools to facilitate the fixing of the Year 2000 problem. This offering includes both IBM and non-IBM products. These products span the inventory and assessment, find and fix, to the testing phases of a typical Year 2000 project. For additional information on VisualAge 2000 and other Year 2000 related articles, please refer to the April 1997 issue of the IBM COBOL Newsletter.

In the next few sections, we will examine the capabilities that VisualAge for COBOL (VA for COBOL) bring to bear in solving the Year 2000 problem. We will then look at these capabilities in the context of a problem or scenario that typical IT organizations face as they plough through their COBOL inventory and allocate resources to manage this through the next millenium.

VisualAge for COBOL

On May 6, 1997, IBM announced version 2 of VisualAge for COBOL with additional support for remote host development, Year 2000, and Windows development. Let us look at each of these in detail.

Remote Host Development

This capability enables the COBOL developer to perform host development and maintenance tasks on an OS/2 or Windows NT workstation. We will review three areas associated with this:

  • remote edit/compile/debug (remote E/C/D)
  • remote data access
  • host data type support.

Remote E/C/D allows you to remotely edit a host COBOL source file using a workstation language sensitive editor, initiate a compile on the host, and debug the program that is running on the host with a workstation graphical debugger. In addition, MVS jobs can be submitted and its output viewed from the workstation. These tasks are accomplished from the workstation development environment. The communications protocol used to cooperatively work with the MVS host can be either APPC (on OS/2) or TCP/IP (on OS/2 and Windows NT).

Remote data access allows you to run a VA for COBOL application on the workstation that accesses MVS host data using either APPC (on OS/2) or TCP/IP (on OS/2 and Windows NT). The MVS host data can be QSAM, VSAM, and PDSE files.

These host files appear to the workstation application as local files.

Host data type support enables the processing of EBCDIC and hexadecimal floating point data from a VA for COBOL workstation program.

Year 2000 support

The Year 2000 support comes in the form of Language Environment (R) Date/Time callable services that are part of the host Language Environment run-time product. This support is available with the Standard offering of VA for COBOL.

Additional support comes in the form of the Year 2000 Impact Tool that is part of the Professional offering of VA for COBOL. This tool assists the developer in locating occurrences of two digit year fields in the program by using a seed list as input. This extends the capabilities provided with the other Redeveloper tools in the Professional offering. These tools are:

  • Application Understanding enables the inventory of MVS application portfolio as represented by the jobs in the job libraries. It allows the analysis of impacts to other modules and data sets as result of changes to either programs or data sets.
  • Program Conversion and Structuring enables the conversion of pre-ANSI 85 COBOL source code to the current ANSI 85 level. It facilitates the structuring of programs that do not conform to structured programming principles and eliminates dead code in the process.
  • Program Understanding enables the graphical analysis of the relative complexity of a program and the data flow analysis between programs in executable units.

Windows Development

Version 1.2 of VisualAge for COBOL provided a compiler, run time, editor, debug tool, performance analyzer, and Workframe support for Windows 95 and Windows NT. Version 2.0 expands this with additional data access support on Windows 95 and Windows NT and with a data assistant tool, transaction assistant tool, and the VisualAge visual application builder on Windows NT.

A Year 2000 Scenario

Now that we are familiar with some of the capabilities of VisualAge for COBOL, how can we integrate these into our application development environment? Let us envision this by looking at a Year 2000 scenario from the perspective of making changes to a host COBOL source program.

You are a development programmer assigned to fix a particular program that is infested by the Year 2000 bug. This program was identified earlier as part of your company's Year 2000 inventory and assessment. The following are some characteristics of this program:

  • IBM OS/VS COBOL 2.4 (pre-ANSI 85)
  • 2-digit year fields scattered throughout, impact analysis has identified these fields based on well-known heuristics (one of these fields is TODAYS-DATE)
  • complex and hard to understand because of many years of maintenance
  • runs as part of job ARDUE.

The following sequence is one possible approach for fixing this program.

  • Use application understanding to understand the job structure of ARDUE and determine the data sets ARDUE uses. In addition, determine other jobs using these data sets. This impact analysis complements the results from the earlier inventory and assessment. It helps identifies additional programs to be examined for Year 2000 errors.
  • Use the Program Conversion to convert it to the ANSI 85 level. This step is needed to use either the ANSI 85 date intrinsic functions (date field expansion technique) or the Language Environment date/time callable services (century windowing technique).
  • Use the Program Structuring to structure the program. This reduces the program complexity and makes it easier to understand and enhance. In addition, structuring can eliminate dead code and thus reduces the inadvertent wasting of resources on code that will never be executed.
  • Use Program Understanding to graphically analyze the converted/structured program and to perform data flow analysis on data items that will be modified. For example, the 2-digit year field TODAYS-DATE must be expanded to 4-digits when considering field expansion as the solution. Data flow analysis can pinpoint those data items that are affected by this change (due to data movement and comparison); thus, an affected data item named JUNK or XXX will be highlighted. Note that JUNK or XXX would normally not be detected using the usual rules-of-thumb for detecting date fields.
  • Use the VA for COBOL editor to make the required changes.
  • Use the VA for COBOL workstation development environment to perform the necessary edit/compile/debug cycle or use the remote edit/compile/debug facility to test the program on the host where it will be eventually deployed.

The process described here does not represent the complete process needed for fixing Year 2000 problems. It describes one possible approach for a portion of this process, specifically the find and fix phase.

The Bottom Line

The use of a workstation-based development environment provided by VisualAge for COBOL can bring about productivity gains, especially for companies with very constrained host resources. The use of workstation based development tools can enhance the morale of the COBOL development staff as they use this to bridge their legacy host based skills to the workstation arena. In addition, the ability to cooperatively work with the host eliminates the time needed to download and synchronize data that exist on both the host and the workstation. While the initial investment may be driven by operational and tactical reasons, the payoff extends beyond meeting the Year 2000 challenge. VisualAge for COBOL also provides capabilities to enterprises and to participate in the object-oriented, network computing arena and thus position these companies to meet their strategic needs, now and beyond the Year 2000.

References

IBM COBOL Newsletter, Issue 6, April 1997.

IBM Announcement Letter No. 297-142, May 6, 1997.

Trademarks

VisualAge, OS/2, MVS, and Language Environment are registered trademarks of International Business Machines Corporation in the United States or other countries or both.

Windows is a registered trademark of Microsoft Corporation.

Enjoy the article? Subscribe to Eye on Objects!

Wilbert Kho is an advisory developer and a member of the Worldwide AD Sales and Technical Support team of IBM. He has a B.S. in Electrical Engineering from the University of the Philippines, an M.S. in Computer Science from Northern Illinois University, and an M.B.A. from the University of Phoenix. He is an adjunct faculty member of the University of Phoenix. Wilbert has been in the IT industry for more than 15 years and has been working with object technology for the past three years.

Home Page