Get Smart: Get SmartDate
TEST DRIVE ROAD REPORT
Robelle Solutions Technology Inc.
A set of callable routines for manipulating dates that can be called from most 3GL languages on both MPE/V and MPE/iX (NM and CM). The product also includes a date calculator program to test various date manipulations.
SmartDate costs $750 per server. For those in a hurry, the product can be ordered and downloaded (a package of about 800K) from Robelle's Web site. Support is by telephone, fax or e-mail. A 30-day evaluation copy is available upon request or can also be downloaded from Robelle's Web site.
Let's see now, how many days until I can retire? I'll just key the dates into my little date calculator program here: 170528-970717= .... 29,169! Why that's almost 80 years! That can't be!
Fanciful? I suppose. But according to industry watchers, the Year 2000 problem, of which the above is an example, is going to cost government and industry billions to solve. The popular and trade literature is already full of stories about the horror that is going to, and in some cases is already starting to, befall us as December 31, 1999 approaches. Which, by the way, is less than 900 days from now, in case you are keeping track.
The SmartDate Date and Time Library, from Robelle Consulting, the makers of well known products such as Qedit and Suprtool, is a set of routines for converting, manipulating, reformatting and calculating dates. The routines are callable from most 3GL languages on both MPE/V and MPE/iX (NM and CM). They provide a general way to obtain today's date, convert dates between various internal and external formats and perform calculations such as determining the number of days between two dates. [The answer I was looking for above turns out to be 7,255 days according to SDATE, the date calculator included in the SmartDate package. But who's counting?]
You might ask, "Why should I pay for date routines when HP is going to include year 2000-compliant date routines in MPE/iX?"
Good question. First consider the phrase "is going to include". The latest promise I heard is that the date routines will appear in Express Release 4 sometime before the end of the year.
So let me ask you a question: How do you like ODBCLink/SE? After all, it has been out for over a year, right? It's not? Big oops - SmartDate is available now.
Ah, but you say HP's date routines are available now on the Jazz Web server. True enough. But are they supported? Not really, not yet anyway. SmartDate is fully supported by Robelle, a company with a history of supplying quality software and support. Since SmartDate technology has been part of Robelle's software products for several years, it is thoroughly stress tested. HP's routines were written within the last year and have not been tested in real world situations.
Are HP's routines callable from CM languages? I don't think so. At least not without great effort writing switch stubs. SmartDate works equally as well with SPL code from 20 years ago as with newly written Pascal/iX or COBOL/iX code.
In another life, I had a set of date handling routines that all my systems used - a good programming practice. But the routines, and hence the systems, were not Year 2000 ready. You may have a similar situation. By using SmartDate in my date handling routines I could have made my systems Year 2000 ready with minimal programming effort.
There are only three parameters for RDTCONVERT: "from date," "to date" and "control record." The "control record" contains four fields: "from type," "to type," "auxiliary result" and "status code." SmartDate supports 28 date formats, including CALENDAR, MM3000 and Powerhouse formats. It also supports 10 "edit" options (which are really calculations), including "days between dates" and "day of the week." The "from type" field of the control record is packed with both the format code and the edit code, if any.
As part of each call to RDTCONVERT, the "from date" is checked for validity, that it conforms to the format specified and that any month and day specified is valid (including checking the validity of February 29). Additional validity checking, such as ranges, can be performed by specifying an edit option.
If the "from date" has a two-digit year component, SmartDate will assume the current century unless the "cutoff year" edit option has been chosen, or a cutoff year value has been assigned to the JCW RobelleCutoffYear (possibly by a logon UDC).
If the two-digit year in the "from date" is on or after the cutoff value, 1900 is the assumed century. If it is before the cutoff value, 2000 is the assumed century. Note that the "cutoff year" edit option overrides any value in the RobelleCutoffYear JCW.
I have two minor, but potentially annoying, problems with the SmartDate routines: The maximum number of days between dates that SmartDate can calculate is limited to 9999, and Julian date types are not supported.
In the case of days between dates, this is almost certainly an artificial constraint caused by the definition of the COBOL interface. It should be noted that SmartDate is clearly aimed at the abundant COBOL legacy code extant in HP 3000 shops, although SmartDate will work with any 3GL. So, I had to manually calculate (actually make an educated guess at) the 29,169 days of the first paragraph.
Lack of Julian date format support is a bit more puzzling, although I ran into the same lack of support when Test Driving Adager's date tools. Apparently, few HP 3000 programmers use the Julian format, probably because it is not a convenient format to use in COBOL.
Robelle continues the tradition with SmartDate. The manual is thorough, well indexed, easily understood and full of examples. Online help for the stand-alone SDATE date calculator is extensive and well organized. The documentation contains source code examples of complete COBOL and Pascal programs that use SmartDate. SmartDate documentation is also available in Microsoft Windows WinHelp format (which requires Windows 3.1 or later). And I do not mean just an outline of the manual. The entire manual, including the source code examples, is available for view (and copy/paste) this way. You download it as a compressed self-extracting zip file to your PC. Then you install it as you would any other PC software. Robelle also gives you the means to print complete copies of the 50-plus page manual locally.
Before using the SmartDate routines, you have to decide how you are going to use them. If using them on an MPE/V machine or on an MPE/iX machine in Compatibility Mode, Robelle recommends installing them in the system SL and provides a job to do this. For NM use on MPE/iX, Robelle recommends adding the appropriate XL= to your RUN commands.
If you need help with date handling in your Year 2000 programming project, you don't have to wait on promises. And you don't have to re-invent the wheel. Just get SmartDate.