.enable substitution
;
;	Accounting Update Command File
;
;		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.
;
;
.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:
.open logcalc.cmd
.data $job
.data $data
.data sys maint
.data $eod
.data $run timelog
.data $data
.data 'month'
.data y
.data n
.data $eod
.data $bro tt0:all done
.data $eoj
.close
.32:
submit /noprin/log=logcalc.cmd
