SUBROUTINE TTIME **************************************** * This subroutine returns the number of * hours worked by a given employee. * It is called from dictionary item * TTIME in CLOCKFILE. **************************************** $INCLUDE ACCESS.COMMON $INCLUDE GEN.COM2 OPEN FILENAME$ TO CLOCKFILE ELSE ABORT 201,FILENAME$ READ REC FROM CLOCKFILE,ID$ THEN REC.CNT=DCOUNT(REC,VM) IF REM(REC.CNT,2) THEN REC.CNT=REC.CNT-1 TTIME=0 FOR X=1 TO REC.CNT STEP 2 TTIME=TTIME+(REC<1,X+1>-REC<1,X>) NEXT X TTIME=INT(TTIME/60) HOURS=INT(TTIME/60) MINUTES=REM(TTIME,60)'R%2' CURRENT$=HOURS:":":MINUTES END RETURN CURRENT$