A MACRO SUBPROGRAM TO CONVERT CLUNKS TO DATES AND DATES TO CLUNKS The module CLUNK.MAC can be used to convert Datatrieve-11 clunks to system date and time and back again. It can be called by a Macro, Fortran, or Basic-Plus 2 program. This routine was inspired by the article on Datatrieve dates by Chuck Watson in the Feb. '81 issue of the Wombat Examiner. I saw it as desirable to have a application program using the FMS package access a data file created by Datatrieve, hence this routine came about. CLUNK has been tested for date conversions for all days between 1-Jan-1900 thru 31-Dec-1999. This seems to be a useful subset of dates for our particular installation. This subset also dodges the issue of what happens at the turn of the century by avoiding it... Time-of-day is also included in this implementation. Although Datatrieve-11 is not capable of exspressing it, it can be extracted and used by application programs. Datatrieve does not seem to mishandle these dates which have time also included in them. As far as BP2 and Fortran are concerned, the Datatrieve time unit is a 4-word integer array and should be treated as such in I/O statements. For BP2, include the time in the MAP statement used to define the record definition. For Fortran, include the time in the I/O list for reads and/or writes (don't forget the FORMAT statement). Your comments and recomendations for improvemnt are welcome. The code is not quite as clean as I would like it, but it would not otherwise make it to Miami.... If you find this useful, please let me know. Bob Rock Northeast Electronics Div Northern Telecom Inc. Airport Rd. Concord, N.H. 03301