10	! PROGMONTH.BAS
	! PROGRAM TO MANUALLY SET UP FOR CALL TO PROGMON
	! IN ORDER TO SET UP A VIRTUAL ARRAY OF PROGRAMMER INFO
100 DIM R$[60]V
150 DIM M$[3](12),M&(12)
160 DIM CH$[20]V
200 DIM #16,PR%(21472)
430	M$(1)="JAN" : M&(1)=31 :
	M$(2)="FEB" : M&(2)=29 :
	M$(3)="MAR" : M&(3)=31 :
	M$(4)="APR" : M&(4)=30 :
	M$(5)="MAY" : M&(5)=31 :
	M$(6)="JUN" : M&(6)=30 :
	M$(7)="JUL" : M&(7)=31 :
	M$(8)="AUG" : M&(8)=31 :
	M$(9)="SEP" : M&(9)=30 :
	M$(10)="OCT" : M&(10)=31 :
	M$(11)="NOV" : M&(11)=30 :
	M$(12)="DEC" : M&(12)=31	! NAMES OF MONTHS, DAYS IN MONTH
600	 ! ASK USER FOR MONTH OF BILLING STATEMENT
610 INPUT "MONTH OF BILLING (MMYY) "; M
620 M&=INT(M/100) : IF M&<1 OR M&>12 THEN  PRINT "BAD MONTH" : GOTO 610
630 Y&=M-(M&*100) ! YEAR OF BILL
635 IF 4*INT(Y&/4)<>Y& THEN M&(2)=28	! CORRECT FOR NON LEAP YEAR
640 IF M&>6	 THEN FY&=Y&+1
		 ELSE FY&=Y&		! FISCAL YEAR IS JULY-JUNE
650 D1=DCEN(STR$(M&)+"/01/"+STR$(Y&))		! FIRST DAY OF MONTH
	D2=D1 + M&(M&)-1			! LAST  DAY OF MONTH
1000 CH$="PROGMONTH/LI:3000"
1100 INPUT "SORT FILES ",A$
1110 IF POS(A$,"N")=1 THEN CHAIN "PROGMON/RT/LI:1200"
	ELSE CHAIN "PROGMON/RT"
2000 OPEN #16,M$(M&)+STR$(Y&)+".VPG/RO/BL"
2010 DEF FNSU(PJ,DA,PG)=(PJ*32+DA)*11+PG
2020 INPUT "PROJECT, DAY, PROGRAMMER ",PJ,DA,PG
2030 PRINT PR%(FNSU(PJ,DA,PG))
2040 GOTO 2020
3000 EXIT
