Developing major, real-world, speech-aware applications using Object REXX
John J. Urbaniak, Ph.D.
Some have said "REXX is just a scripting language." We do not believe this is true. We believe that REXX, particularly Object REXX, is an excellent language for major, real-world application development. I hope to show you today such a system, developed entirely in Object REXX.
Computerized Maintenance Management Systems (CMMS)
The image of Maintenance is changing. In the past, Maintenance was considered as "those guys who fix the toilets."
Why would Maintenance ever need sophisticated computer software?
Think about it: No plant, no factory, no hospital or school, no enterprise which has equipment can afford to neglect that equipment.
If we expect top-notch performance from our automobiles and home appliances, we must perform the recommended maintenance.
Imagine the maintenance requirements for today's advanced equipment, such as sophisticated printing presses, automotive assembly equipment, hospital diagnostic and treatment equipment, complex HVAC and equipment, and so on.
Governments have strict safety, health and environmental requirements which require rigorous inspections and maintenance work, along with auditable documentation that the work has been performed.
Estimates indicate that CMMS will be a $6 Billion market over the next five years.
So, let's see what a modern CMMS should contain. It should contain modules to:
Schedule periodic maintenance jobs (Work Orders)
For appropriate management considerations, a good CMMS should be able to:
Maintain accurate Cost records for work performed, costs of
In summary, Maintenance Management has become a true Profession. Companies realize today that investments in Maintenance pay off in terms of:
Bottom line profits
Aviar has long been in the CMMS field. Our DOS program, called the "Ounce of Prevention System," is highly regarded in the field, having scored the "Best Overall" rating in Industry Week Magazine's "Best of the Best" user satisfaction survey.
We have upgraded this system, and called it the "Oz. of Prevention System," or "Oz" for short.
Oz is written 100% in Object REXX. It is based on IBM's DB2 or Universal Database system. It runs on OS/2 or the new WorkSpace On Demand platforms.
I would like to demonstrate some of the features of Oz. For more details, please check our website
Major: 26 interconncted Database Tables
Notice the consistent interface found in these modules. We will now discuss how we did this.
Oz is written 100% in Object REXX. Object REXX provides several very powerful tools which an application programmer can use in development.
We will focus on three of them:
DateLib - a library of date routines.
The "magical" statements -
::class Oz!DateLib public
::method INIT class
- put the entire class into the (global) environment.
Thus, any method of the class, including class methods, are available to any program in the system, and may be invoked by statements like
x = .Oz!DateLib~methodName(arg1, arg2, ...)
Our .Oz!DateLib contains the following methods:
::method AddDays class
::method ymd2Jul class
DBLib - a library of database routines.
::class Oz!DBLib public
::method INIT class
Some typical methods appearing in DBLib are:
::method INSERT class
::method DELETE class
::method SELECT class
/* This method returns values for fields */
.Oz!Names - basis of Internationalizability and customizability.
All messages in the system invoke
.Oz!Names is a subclass of the directory class. It is built upon initialization by reading a plain text file (BldNames.DAT) and storing the entries in the .Oz!Names directory.
Here is a section of the BldNames.DAT file:
And here is the program which builds the directory:
/* BldNames.CMD - read BldNames.DAT & create Oz!Names directory entries */
Throughout Oz, instead of using "hard-coded" literal strings for messages, captions, etc., we use
This simple technique, handled remarkably well by Object REXX, makes our system 100% translatable and flexible.
We saw a demo of Scripting in the Parts module, where we sent messages to the Open Purchase Order module. Here is how we did that. In every module, we launch a thread with the statement:
/* Start the ScriptReading method */
Here is the code for the ScriptRead method:
::method ScriptRead class unguarded /* ================================= */
Here is the method which creates the ScriptArray:
::method ScriptWrite class unguarded /* ================================= */
and in the actual program modules, we have code like the following, which creates the executable Script statements:
click = .Oz!Pref~getval('BM_CLICK')
John J. Urbaniak, Ph.D. of Aviar, Inc. presented the above at the 1998 Rexx Symposium in Raleigh, NC (USA). He kindly let us post this for our readers. As far as I know, all rights are his. It will also be available in hard-copy form when the "Proceedings of the Rexx Symposium for Developers and Users" goes into print. [Ed]