49 lines
1.3 KiB
Plaintext
Executable File
49 lines
1.3 KiB
Plaintext
Executable File
* CLOCK.BACKUP.ONE
|
|
*
|
|
$INCLUDE GEN.COMMON
|
|
$INCLUDE USER
|
|
*
|
|
OPEN 'INFO.HIST' TO INFO.HIST ELSE ABORT 201, 'INFO.HIST'
|
|
OPEN 'USER' TO USER ELSE ABORT 201, 'USER'
|
|
OPEN 'CLOCK.GEN.KEYS' TO CLOCK.GEN.KEYS ELSE ABORT 201, 'CLOCK.GEN.KEYS'
|
|
*
|
|
*
|
|
EOF=0 ; T=0 ; WT=0
|
|
*
|
|
CRT @(0,22):CL:BEEP:RV:" ARE YOU SURE YOU WANT TO RESTORE LAST PAY PERIOD? (Y/N) :":ERV:
|
|
INPUT BACK.ANS,3
|
|
IF BACK.ANS[1,1] # 'Y' THEN ENTER MSD.INFO.ACCRUAL
|
|
CRT @(0,22):CL:RV:" ENTER PASSWORD >>>":ERV:
|
|
HUSH ON
|
|
INPUT PASSR,20
|
|
HUSH OFF
|
|
IF PASSR # 'IXOYE' THEN ENTER MSD.INFO.ACCRUAL
|
|
CRT @(0,22):CL:BEEP:RV:" THIS WILL OVERWRITE CHANGES MADE IN THE PAST TWO WEEKS! <return> ":ERV:
|
|
INPUT ANY,1
|
|
*
|
|
READ NEXT.PAY FROM CLOCK.GEN.KEYS,"NEXT.PAY.PERIOD" ELSE
|
|
CRT @(0,22):CL:BEEP:RV:" ERROR - MISSING GK NEXT.PAY.PERIOD <return> :":ERV:
|
|
ENTER MSD.INFO.ACCRUAL
|
|
END
|
|
*
|
|
LAST.PAY=NEXT.PAY-28
|
|
*
|
|
SELECT INFO.HIST
|
|
*
|
|
LOOP
|
|
READNEXT ID ELSE EOF=1
|
|
UNTIL EOF DO
|
|
IF OCONV(ID,'G1*1') = LAST.PAY THEN
|
|
READ UREC FROM INFO.HIST,ID THEN
|
|
NEW.KEY=OCONV(ID,'G0*1')
|
|
WRITE UREC ON USER,NEW.KEY
|
|
WT=WT+1
|
|
END
|
|
END
|
|
REPEAT
|
|
LAST.PAY=LAST.PAY+14
|
|
WRITE LAST.PAY ON CLOCK.GEN.KEYS,"NEXT.PAY.PERIOD"
|
|
CRT @(0,22):CL:RV:" ":WT:" USER RECORDS RESTORED FROM LAST PAY PERIOD! <return> :":ERV:
|
|
INPUT ANY,2
|
|
ENTER MSD.INFO.ACCRUAL
|