7000  REM(C) +++++++++++++++++++++++++ Restore account from catalog
7010  PRINT "Restores program/file status' from an ASCII catalog file"
7020  Z7=0
7030  PRINT LIN(1)"File with standard account catalog: ";
7040  LINPUT A$
7050  IF A$="" THEN 7440
7060  ASSIGN A$,1,Z9
7070  IF Z9<3 THEN 7100
7080  PRINT "...File not available, code="Z9
7090  GOTO 7020
7100  C$="PRI-LOC-PRO-UNR-"
7110  IF  END #1 THEN 7440
7120  REM ---------------------------- read heading
7130  GOTO TYP(1) OF 7160,7140,7160
7140  READ #1;B$
7150  IF POS(B$,"NAME    L") THEN 7180
7160  PRINT "...Not an account library."
7170  GOTO 7440
7180  PRINT 
7190  PRINT "name               name               name"
7200  REM ---------------------------- read a line
7210  READ #1;B$
7220  GOTO TYP(1) OF 7160,7230,7160
7230  FOR P=0 TO 2
7240  IF SYS(3) THEN 7440
7250  IF B$="" THEN 7420
7260  Z=POS(" LPU",B$[9,9])
7270  IF  NOT Z THEN 7380
7280  A$=C$[1+(Z-1)*4]
7290  A$[5]=B$[1,6]
7300  SYSTEM Z9,A$
7310  B$[10,10]="= "
7320  IF Z9 THEN 7350
7330  B$[12,24]=A$[1,3]
7340  GOTO 7390
7350  B$[12,24]="-?-"
7360  Z7=Z7+1
7370  GOTO 7390
7380  B$[10,16]="= error"
7390  PRINT B$[1,19];
7400  B$=B$[25]
7410  NEXT P
7420  PRINT 
7430  GOTO 7210
7440  ASSIGN *,1
7450  IF  NOT Z7 THEN 7470
7460  PRINT LIN(1);"...";Z7;"entries were unable to be restored."
7470  RETURN 
9999  END 
