.enable substitution
;
;	Accounting Update Command File
;
;		This file will close the current accounting 
;	files, rename them to indicate that they are the previous
;	month's accounting files, create the current month's 
;	accounting file, and then start the billing program.
;
;		This file should be run within the first week
;	of every new accounting period. The accounting period 
;	can be any integral number of months, however one month
;	is recommended. The only restriction is that the accounting
;	period must start at the beginning of the calendar month.
;
;
.ask ok	Have all the following conditions been met
.iff ok .goto 32
.parse <date> "-" a1 a2 a3
.SETS MNTH0 "DEC"
.sets mnth1 "JAN"
.sets mnth2 "FEB"
.sets mnth3 "MAR"
.sets mnth4 "APR"
.sets mnth5 "MAY"
.sets mnth6 "JUN"
.sets mnth7 "JUL"
.sets mnth8 "AUG"
.sets mnth9 "SEP"
.sets mnth10 "OCT"
.sets mnth11 "NOV"
.sets mnth12 "DEC"
.setn count 12.
.setn cntm1 12.-1.
.55564:
.if mnth'count' eq a2 .sets month mnth'cntm1'
.setn count count-1.
.if count eq 0 .goto 432
.setn cntm1 cntm1-1.
.goto 55564
.432:
.enable quiet
set /colog=off
PIP CUMLOG.LOG=CONSOLE.LOG;*/ap
PIP CUMLOG.LOG/PU
.ask ok ok to delete console.log
.ift ok PIP CONSOLE.LOG;*/DE
SET /COLOG=on/nocoterm
pip cumlog.'month'=cumlog.log/re
pip acctlog.'month'=acctlog.log/re
.sets dumstr "     "
.open cumlog.log
.data 'dumstr' CUMLOG.LOG INITIALIZED ON '<date>' '<time>'
.data 'dumstr'
.data 'dumstr'
.data 'dumstr'
.close
.open acctlog.log
.data 'dumstr' ACCTLOG.LOG INITIALIZED ON '<date>' '<time>'
.data 'dumstr'
.data 'dumstr'
.data 'dumstr'
.close
.32:

