tldm-universe/CMS/BP.CLOCK/DSB
2024-09-10 15:25:06 -04:00

29 lines
547 B
Plaintext
Executable File

OPEN 'DICT CLOCKFILE' TO CLOCK1 ELSE ABORT
OPEN 'DICT CLOCKFILE2' TO CLOCK2 ELSE ABORT
EOF=0; NUM.READ=0; NUM.DONE=0
SELECT CLOCK1
LOOP
READNEXT ID ELSE EOF=1
UNTIL EOF DO
IF REM(NUM.READ,1) ELSE GOSUB 2000
GOSUB 1000
REPEAT
GOSUB 2000
CRT @(0,22):"Press any key to continue...":
ANY=""; INPUT ANY
STOP
*
1000 *
READ REC FROM CLOCK1,ID THEN
NUM.READ=NUM.READ+1
WRITE REC ON CLOCK2,ID
NUM.DONE=NUM.DONE+1
END
RETURN
*
2000 *
CRT @(-1)
CRT @(0,5):"Number records read: ":NUM.READ
CRT @(0,6):"Number records done: ":NUM.DONE
RETURN