DATA KOKUGO,100,SYAKAI,80,SUUGAKU,50,RIKA,40,EIGO,90
OPEN #1: NAME "a:DATA1.TXT"
ERASE #1
DO
   READ IF MISSING THEN EXIT DO: A$,N
   PRINT #1:A$;",";N
LOOP
CLOSE #1
OPEN #2: NAME "a:DATA1.TXT"
DO 
   INPUT #2,IF MISSING THEN EXIT DO: A$,N
   PRINT A$,N
LOOP
CLOSE #2
END

