IMPACT
'96 -- a great success!
By Kevin Fuller
The 1996 IMPACT Conference
was held in San Francisco this year (May 19- 22). Both the Model 204 and
System 1032 user communities attended.
For System 1032,
CCA announced details of Version 9.7 and Version 2.0 of our ODBC Driver.
V9.7 will contain update trigger procedures. It also contains a system
variable for user-definable defaults for 2-digit year inputs, plus a few
other PL1032 and efficiency enhancements. One of the highlights was the
demonstration of a Web-based System 1032 application.
V9.7 will be required
for a whole new ODBC connection. V2.0 of the ODBC Driver will be rearchitected
to deliver better performance and will support 32- bit and Macintosh clients
in addition to Windows 3.x. For Model 204, CCA demonstrated parts of the
next release, V3R4, which includes the ability to build client/server
applications using User Language (in addition to the ODBC and CLI options
that already exist).
CCA also demonstrated
Model 204 access from the Web for those interested in having Model 204
data available through Internet or intranet applications.
From the wish list,
V3R4 has a significant number of additional enhancements to improve performance,
help deal with year 2000 issues (see accompanying article), and enhance
general functionality.
Plan now for IMPACT
'97
Please start preparing
now for IMPACT '97, which will be held April 27-30, 1997, at the Hyatt
Regency in Denver, Colorado. IMPACT is a great place to receive training,
learn about new product features and enhancements, and share application
implementations with other users. For additional information regarding
IMPACT '97, contact the Impact Office at 617-595-2005.
Model
204 Technical Note:
Moving
into the 21st Century--
Century
Parameters in V4R1
By Steve Estes
In
V3R2 of Model 204, when dates with 2-digit years were converted to dates
with 4-digit years, the century prefix was assumed to be `19'. As we approach
the year 2000, the user needs to have more control over this conversion.
In
V4R1 we introduce three new user parameters: DEFCENT, CENTSPLIT, and BASECENT.
Two of them, DEFCENT and CENTSPLT, are mutually exclusive, so that when
one is specified the other becomes inactive. The third parameter, BASECENT,
is view-only. It is tied to the CENTSPLT parameter, so that when CENTSPLT
is inactive BASECENT is also inactive. These new parms give the user two
choices for how the 2-digit year to 4-digit year conversions take place.
The
DEFCENT parameter specifies the default century prefix to be used when
converting a 2-digit year to a 4-digit year. For example, if DEFCENT=20,
then a 2-digit year of 96 is converted to a 4-digit year of 2096. The
value is decimal and must be in the range of 00 to 99. When a Model 204
session is initiated, this parameter is set by default to the century
prefix of the current system date. If the user views this parameter while
it is inactive, the value NONE is returned.
As
the year 2000 gets closer, many programs will compute dates beyond the
year 2000 and will have to deal with dates from both centuries, so the
DEFCENT parameter might not be the best choice. For those users, we have
the new CENTSPLT parameter that defines a new way to split the century
up. Traditionally, 2-digit years from 00 to 99 were assumed to be in the
same century, but with the CENTSPLT parameter the user can change that.
The user can say, for example, that 2-digit years 50 to 99 are really
1950 to 1999, and years 00 to 49 are really 2000 to 2049 simply by setting
CENTSPLT to 50 to define a new century split. The CENTSPLT parameter is
used to define the lowest year of the lower century prefix.
The
CENTSPLT parameter takes a decimal argument from 00 to 99. When specified,
it also computes a base century that it saves as the BASECENT parameter.
When a 2-digit year is converted to a 4-digit year, the year is compared
to the CENTSPLT value. If the 2-digit year is greater than or equal to
the CENTSPLT value, the base century is used as the century prefix. If
the 2-digit year is less than the CENTSPLT value, the century prefix is
equal to the base century plus one.
The
computed base century value is viewable as parameter BASECENT. This parameter
is automatically displayed whenever CENTSPLT is set. The computation is
as follows: the base century is initially set to the century prefix of
the current system date. Then, if the last two digits of the current system
date are less than the CENTSPLT value, the base century value is decremented
by one. Some examples follow:
- If the current
date is May 23, 1996 with CENTSPLT=50, BASECENT starts at 19 and, because
96 is greater than 50, it stays 19.
- If the current
date is May 23, 2006 with CENTSPLT=50, BASECENT starts at 20, but because
06 is less than 50, BASECENT is decremented to 19.
Because
of the way the base century is calculated, you might get unexpected results
if you set CENTSPLT incorrectly. Consider the following scenario:
The
current date is May 23, 1996 with CENTSPLT=97. BASECENT starts at 19,
but because 96 is less than 97, BASECENT is decremented to 18.
The
rule of thumb here is: do not set CENTSPLT to a value higher than the
current 2-digit year, if the current year is in the lower century of the
range split; that is, 1996 is in the lower century in this case, so it
is very unlikely that you will want to set CENTSPLT higher than the current
year (96).
The
following examples show usage of the CENTSPLT parameter:
- The current date
is May 23, 1996 with CENTSPLT=50, so BASECENT=19. The date 11/23/90
needs conversion. Because 90 is greater than 50, the date becomes 11/23/1990,
because BASECENT is unchanged. If the date were 11/23/05, then 05 is
less than 50, so the date becomes 11/23/2005, because BASECENT is incremented.
The current date is May 23, 2006 with CENTSPLT=50, so BASECENT=19.
- The date 11/23/98
needs conversion. Because 98 is greater than 50, the date becomes 11/23/1998,
because BASECENT is unchanged. If the date were 11/23/02, then 02 is
less than 50, so the date becomes 11/23/2002, because BASECENT is incremented.
The
portions of the system modified to use these parameters are the $DATECNV
and $DATEDIF user functions. By default, they use whichever parameter
is active.
Alternatively,
both these functions have two additional optional arguments (for $DATECNV,
arguments 4 and 5, for $DATEDIF, arguments 5 and 6) that allow the specification
of either a DEFCENT value or a CENTSPLT value (in that order) that are
in effect for that one function call. Like the parameters, the arguments
are mutually exclusive, so you can specify only one of them on a call.
For example, to specify a CENTSPLT argument to $DATECNV, the call is:
%A
= $DATECNV(fmt1,fmt2,datei,,%CENTSPLT)
In the next issue
Watch for the next
issue of CCAPRINT, coming to you in July. The System 1032 Technical
Note in that issue will discuss century parameters for V9.7.