|
IBM Millennium Language Extensions" ![]() |
What is MLE?
MLE is short for Millennium Language
Extensions, IBM's patent-pending technology that provides support for automated
date windowing in its year 2000 ready COBOL and PL/I compilers. These extensions
give you a mechanism to indicate to the compiler which dates should be windowed.
It is a compiler-assisted solution for your windowed dates. Using Language Environment
on MVS, OS/390, VM, or VSE gives you windowing support at runtime by supplying callable
service routines to set and query a century window. But MLE provides even more assistance,
essentially providing the logic that you would otherwise have to code yourself.
With MLE, you have the ideal situation: the ability to fix programs with few, if
any, PROCEDURE DIVISION changes. While century windowing is the quickest and most
powerful feature, field expansion is also supported, making MLE the easiest way
to implement permanent internal bridges.
When is MLE a Year 2000 Solution?
MLE can help you to implement
two approaches for handling date data:
Inferring the Correct Century Using a Century
Window
With this approach, you establish
a 100-year interval, called a century window, within which you assume all 2-digit
years lie. Programs can then infer the correct century, depending on where in the
century window the 2-digit year lies. For example, if the range of your century
window is 1956 through 2055, and the 2-digit year is greater than or equal to 56,
the century is inferred to be 19; otherwise, if the 2-digit year is less than or
equal to 55, the century is inferred to be 20. There are two types of century window:
the fixed window and the sliding window. The fixed window doesn't change after it
has been established; the sliding window moves forward with the system date.
Expanding Date Fields
With this approach, you copy
the contents of a 2-digit year date field to another, larger, 4-digit year date
field. The millennium language extensions can help you by automatically filling
in the century part (the leading 2 digits) of the year in the receiving field, based
on the century window.
You can use this technique for a
number of tasks, two of which are as follows:
Compilers that Support MLE
Before starting to change any
of your programs to use MLE, you need to ensure that you have the correct level
of software to support the changes. IBM provides support for MLE in the following
compilers:
What You Gain from MLE
Using MLE, you can change your
application data definitions in the Data Division to indicate which data items represent
windowed or expanded dates, and, for windowed dates, how you want the window to
be defined. The compiler can then automatically implement the associated windowing
logic, in many cases without your having to code any changes in the PROCEDURE DIVISION.
Because it is implemented directly by compiler-generated machine code, it is fully
integrated in your code as a high performance windowing solution. So, where windowing
is your approach of choice, MLE can help reduce the programming time and effort
needed to implement a windowing solution and simplify subsequent maintenance of
your application programs. MLE also enables a flexible and comprehensive mixing
of windowed dates with expanded dates within a program, allowing you to:
Limitations of MLE
MLE is not a silver bullet.
It is important to understand that, whatever the merits of MLE, it does not render
unnecessary all the year 2000 work at your enterprise. A windowing solution might
not be an acceptable approach for all your applications. While it can relieve you
of many of the logic changes where you do choose windowing, it does not relieve
you of the assessment, planning, analysis, implementation, and testing activities.
There might be cases where using MLE requires you to make manual logic changes.
Also, the extensions are not intended to be a durable piece of language design,
with a long-term usage. They do not constitute a fully-specified set of date-oriented
data types, with rich semantics, enabling improved functionality for new applications
or enhancements to existing applications. Their use should be limited to making
year 2000 repairs only. In particular, the windowing feature is not intended for
long-term use. The start of the window must be in the range 19001999, so this feature
buys you time to get code through the year 2000 and to a long-term solution that
can be implemented later. Because the extensions do not provide date data types,
the non-year part of the supported date formats is denoted by Xs: no special processing
is done for the non-year part. To do otherwise might change the meaning of existing
programs. The only date-sensitive semantics that are provided involve automatically
expanding (and contracting) the 2-digit year part of dates with respect to the 100-year
window for the program.
Where MLE is Applicable
Any COBOL application that is
compiled with one of the MLE-supporting compilers can use MLE, but consider these
factors:
Using MLE for Year 2000 Work Only
The millennium language extensions
were designed to meet a number of objectives in resolving date processing problems.
To use the extensions effectively in your environment, you should evaluate the objectives
that you need to meet, and compare them against the objectives of the millennium
language extensions, to determine how your application can benefit from them. The
objectives of the millennium language extensions are as follows:
Source Conversion
The level of source code is an
important consideration. If your programs have been compiled with the OS/VS COBOL
compiler, you will have to convert the source, which is at the COBOL 68/74 Standard
level, to COBOL 85 Standard. COBOL and CICS Command Level Conversion Aid (CCCA)
can be a big help with the conversion, very often doing the entire job for you.
Or, if you are going to use VisualAge COBOL for your year 2000 work, then its built-in
facilities make source conversion easy. If your programs have been compiled with
VS COBOL II Release 3 or later, with the NOCMPR2 compiler option, no conversion
is necessary. You can mix MLE programs with unchanged older modules, and only those
programs with date logic need to be recompiled. Note, however, that MLE is not available
in the VS COBOL II compiler. Programs that use MLE must be compiled with one of
the compilers that support MLE.
Sub-systems with No Windowing
COBOL programs with MLE windowing
can be used with any of the subsystems that normally support your applications,
such as DB2, CICS, and VSAM. You can even specify windowed date fields as keys for
sorting and merging if your sort software supports date windowing. However, some
subsystem-specific functions do not support date windowing, and you cannot simply
use windowed date fields in these contexts. Some examples of functions that don't
support windowing are:
MLE Pilot
A pilot project is always something
to consider for your year 2000 work. You should plan to do some preliminary testing
with MLE to determine its usefulness in your environment. Migration to a year 2000
ready compiler is required if you are not already using one and are interested in
taking the windowing approach.
MLE Scenario
If you decide to use a century
windowing approach as all or part of your solution and choose to use MLE, then you
should:
Getting Started with MLE
Consider this short example which
presents a problem and uses MLE in the solution.
A Simple Date Problem
Our example consists of a program
which compares the date that a video tape was returned with the date it was due
back to see whether to impose a fine. The two dates are stored in the file as 6-digit
Gregorian dates; that is, YYMMDD.
If the tape was due back on September
14, 1998, the contents of Date-Due-Back are 980914. If it was returned on September
12, the contents of Date-Returned are 980912. Therefore, no fine is imposed, because
Date-Returned is less than Date-Due-Back. If we go forward in time, we can see how
this reliable program behaves in January 2000. If the tape is due back on January
2, 2000, but is returned on December 31, 1999, the contents of the fields are:
In this case, Date-Returned is much
larger than Date-Due-Back, so the program imposes a hefty fine for being 100 years
late.
A Simple Solution
If the program recognized that
the year 00 was in fact 2000, not 1900, the result would be different. In the new
scenario, the "If ... Then ..." statement would behave properly, viewing
991231 as 19991231 and 000102 as 20000102, resulting in correct logic path and no
fine for the tape that was returned early, not late. IBM COBOL with MLE lets you
do this quite easily, but you have to do a few things to make it work:
The two Ys in the
date pattern yyxxxx mean that the date field is a windowed date
field, to which COBOL will apply the century window that was defined
by the YEARWINDOW compiler option.
Large-Scale Use of MLE
As you can see from the previous
discussion, it's a simple matter to change one COBOL program to take advantage of
automatic date windowing with MLE. But your installation's programs will be more
complicated than this simple example, and you will need to implement changes to
many programs at a time. For large-scale use of the MLE technology, automated tools
are critical for a successful MLE implementation. With the introduction of MLE,
IBM also introduced automation tools to provide a more complete automated windowing
solution. To identify your date-related fields, use IBM's Maintenance 2000 (MA2000).
Once your date fields are found, you can use the COBOL CICS Conversion Aid (CCCA)
to automatically annotate the identified date fields with the correct MLE date format
clause. In many cases, there is no modification required for the source code. More
information on these tools can be found on the VisualAge 2000 Web site at www.software.ibm.com/ad/va2000/.
This section outlines the steps you
should follow in converting a complete application, or a suite of related programs,
to MLE - without the use of automated tools such as MA2000 and CCCA. Note that these
steps are a guideline only; you will need to consider many other factors in formulating
a conversion plan of this magnitude. Some other factors to consider are:
MLE for Your Year 2000 Solution
As shown in the scenarios and
examples given, the millennium language extensions offered with the IBM COBOL and
PL/I compilers may significantly reduce your source-code updates, and thereby improve
your productivity. When windowing is your technique of choice, consider MLE for
this critical part of your year 2000 solution.
|
©1998 IBM Corporation |