41 lines
865 B
Plaintext
Executable File
41 lines
865 B
Plaintext
Executable File
* ONE.BAK
|
|
$INCLUDE GEN.COMMON
|
|
OPEN 'USER' TO USER ELSE ABORT
|
|
OPEN 'USER.BACKUP' TO USER.BACKUP ELSE ABORT
|
|
OPEN 'CLOCK.GEN.KEYS' TO CGK ELSE ABORT
|
|
*
|
|
EOF=0
|
|
T=0
|
|
WT=0
|
|
*
|
|
CRT CS
|
|
PRINT
|
|
PRINT 'BACK UP ONE CLOCK PERIOD FOR REPROCESSING!'
|
|
PRINT
|
|
CRT @(0,22):CL:RV:" ENTER 'B' TO BACK UP ON PAY PERIOD :":ERV:
|
|
INPUT BACK.ANS,4
|
|
IF BACK.ANS # 'B' THEN STOP
|
|
*
|
|
CLEARFILE USER
|
|
SELECT USER.BACKUP
|
|
LOOP
|
|
READNEXT ID ELSE EOF=1
|
|
UNTIL EOF DO
|
|
T=T+1
|
|
READ WK.REC FROM USER.BACKUP,ID THEN
|
|
WRITE WK.REC ON USER,ID
|
|
WT=WT+1
|
|
END
|
|
CRT @(0,15):CL:" BACK UP RECORDS READ :":T
|
|
CRT @(0,16):CL:" BACK UP RECORDS WRITTEN:":T
|
|
REPEAT
|
|
READ DATE.REC FROM CGK,'NEXT.PAY.PERIOD' THEN
|
|
NEW.DATE=DATE.REC<1>-14
|
|
DATE.REC<1>=NEW.DATE
|
|
PRINT ' NEW DATE = ':OCONV(NEW.DATE,'D2/')
|
|
WRITE DATE.REC ON CGK,'NEXT.PAY.PERIOD'
|
|
END
|
|
CRT @(0,22):CL:RV:" CLOCK BACKED UP! :":ERV:
|
|
INPUT ANY
|
|
STOP
|