* MSD.CLOCK.HIST * $INCLUDE GEN.COMMON * CRT CS HDG='MOVE CLOCKFILE RECORDS TO HISTORY' HDL=(80 - LEN(HDG)) / 2 CRT @(0,0):CL:RV:STR(' ',80):ERV: CRT @(HDL,0):RV:HDG:ERV: * TODAY=DATE() * OPEN 'CLOCKFILE' TO CLOCKFILE ELSE ABORT 201, 'CLOCKFILE' OPEN 'CLOCKFILE.HIST' TO CLOCKFILE.HIST ELSE ABORT 201, 'CLOCKFILE.HIST' CRT @(16,3):CL:RV:" This process moves items to CLOCKFILE.HIST. ":ERV: 100 * CRT @(8,9):CR:RV:" Move records to history older than (MM/DD/YY) :":ERV:" ": INPUT BDATE,11 IF BDATE='' OR BDATE=PF3 THEN STOP BDATE=ICONV(BDATE,'D') IF BDATE < 1 THEN GO 100 * IF BDATE > TODAY-180 THEN CRT @(0,22):CL:BEEP:RV:" SIX MONTHS IS REQUIRED TO REMAIN IN ACTIVE FILE! :":ERV: INPUT ANY,3 GO 100 END CRT @(8,9):CL:RV:" Move records to history older than (MM/DD/YY) :":ERV:" ":OCONV(BDATE,'D2/') CRT @(0,22):CL:RV:" ENTER 'B' TO BEGIN PROCESS :":ERV: INPUT BEGIN.ANS,5 IF BEGIN.ANS[1,1] # 'B' THEN STOP CRT @(0,22):CL: * EOF=0 ; T=0 ; WT=0 * SELECT CLOCKFILE LOOP READNEXT ID ELSE EOF=1 UNTIL EOF DO T=T+1 IF REM(T,500)=0 THEN GOSUB 5000 CDATE=OCONV(ID,'G1|1') IF CDATE < BDATE THEN READ CREC FROM CLOCKFILE,ID THEN WRITE CREC ON CLOCKFILE.HIST,ID DELETE CLOCKFILE,ID WT=WT+1 END END REPEAT * GOSUB 5000 * STOP * 5000 * CRT @(8,12):CL:" CLOCK RECORDS READ :":T'L,' CRT @(8,13):CL:" RECORDS MOVED TO HISTORY :":WT'L,' RETURN