MMCC MASTHEAD


CONTENTS

v1.10
Mid-Michigan Computer Consultants, Inc.
509 Center
Bay City, Michigan

Sales (989) 892-9242             Support (989) 686-8860

Visual PL/B Language

REVISION DATE - Application version control

There are numerous ways for a programmer to keep up with the versions of a program which is under development or in maintenance status.

MMCC wanted an automatic method for immediately showing the compile date of any program ever written. The method we chose was to INCLUDE in every program a small snippit of code containing a variable showing the date the program was compiled.

To make this automatic, we wrote a small program called "REVDATE.DBS" which creates a file called "REVISION.DBS". (It also creates another file for including in COBOL programs, of which we once had many.) The "REVISION.DBS" file contains the following lines:
   REV      INIT      "0.0"
   REVDATE  INIT      "mm/dd/ccyy hh:mm:ss"
            TITLE     "mm/dd/ccyy hh:mm:ss"
Including this little module allows the program to simply display the variable REVDATE to show the date and time when the program was last compiled.

The REVDATE program is a SUNDB86A command line program. It's run as part of MMCC's standard compile BATCH file. That means that every compiled program automatically gets an include which shows the time that the program was compiled.

Our practice has been to standardize our character based screen format. The top two lines are always reserved for program indentification. The program name appears in the upper left corner. The current date and time are in the upper right corner. The "REV DATE" is always on the right end of the second line.

When moving to the GUI environment, we continue to use the REVDATE program. We also use a BATCH procedure for invoking the compiler and REVDATE is part of that procedure.

FOR PLBWIN THERE ARE BETTER WAYS
    The PLBWIN compiler has provided this and more information automatically as well. Having this information, our REVDATE procedure could be dropped.

    We continue to use REVDATE, however, because REVDATE also provides some little date checking analysis tricks. Like seeing if the computer's clock has gone backward... and calculating the elapsed time since the last time REVDATE was run. We find these features useful.
To retreive the compiler information within a program compiled under PLBWIN, you use the GETMODE statement. We have included several variables in the COMMONWK.PLS include unit which is also used in every program.
..... items found in COMMONWK.PLS:
    $PROG_NAME      DIM   20     Name of source code file
    $PROG_SERIAL    DIM   10     Serial number assigned by compiler
    $PROG_STAMP     DIM   15     Timestamp when program was compiled
    $PROG_VER       DIM    5     Version of the compiler
    $PROG_REVDATE   DIM   20     Work are to build our own edited revdate

..... instructions placed in individual programs
..... (We actually include this in the "ssssOPEN.PLS" include units)

         GETMODE   *PROGNAME=$PROG_NAME
         GETMODE   *PROGSERIAL=$PROG_SERIAL
         GETMODE   *PROGSTAMP=&PROG_STAMP
         GETMODE   *PROGVER=$PROG_VER
         UNPACK    $PROG_STAMP,ccyy,mm,dd,hrs,min,sec
         PACK      $PROG_REVDATE, mm,"/",dd,"/",ccyy," ":
                                  hrs,":",min,":",sec

CONTENTS

v1.10
Send e-mail to MMCC.

Write to MMCC Technical Support at:
MMCC, Inc.
600 W. Midland
Bay City, MI 48708
(989) 686-8860
| Home   |

© 1997 MMCC, Inc. All Rights Reserved.

Report problems or suggestions to support@mmcctech.com
Site hosted by Molarnet Technologies
Since 09/15/1998