C 
C 
C                   FIRST PRINTING, FEBRUARY 1974
C 
C THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO 
C CHANGE WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED
C AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
C DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPON-
C SIBILITY FOR ANY ERRORS THAT MAY APPEAR IN THIS
C DOCUMENT.
C 
C THE SOFTWARE DESCRIBED IN THIS DOCUMENT IS FUR-
C NISHED TO THE PURCHASER UNDER A LICENSE FOR USE ON
C A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH
C INCLUSION OF DIGITAL'S COPYRIGHT NOTICE) ONLY FOR 
C USE IN SUCH SYSTEM, EXCEPT AS MAY OTHERWISE BE PRO-
C VIDED IN WRITING BY DIGITAL.
C 
C DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY
C FOR THE USE OR RELIABILITY OF ITS SOFTWARE ON EQUIP-
C MENT THAT IS NOT SUPPLIED BY DIGITAL.
C 
C COPYRIGHT (C) 1974, BY DIGITAL EQUIPMENT CORPORATION
C 
C 
C	CNTC SRC(SLIP COMPONENT)  EDIT #2  8/27/73  G. COLE
C	COPYRIGHT DIGITAL EQUIPMENT CORP. 1973
	SUBROUTINE CNTC(A,N,M,L,SCH,LUNSEC,ISCT)
	INTEGER VAL
	DIMENSION A(28)
1	N=0
	ICOM=0
	VAL=0
	M=0
	L=0
	IP=1
	IC=1
	ISCT=6
2	CALL GETCR(A,IP,IC,CHR)
C	WRITE(16,808) CHR,IP,IC
808	FORMAT(' CHR:',A5,' IP,IC:',2I6)
	IF(IP.LT.0) RETURN
	IF((IP.EQ.1).AND.(IC.EQ.2).AND.(CHR.EQ.1H')) GOTO 50
222	IF(CHR.EQ.1H*) GOTO 20
	IF((CHR.EQ.1H$).AND.(IP.EQ.1).AND.(IC.EQ.2)) GOTO 70
	IF(CHR.EQ.1H,) GOTO 30
	IF(CHR.EQ.1H ) GOTO 2
	IF((CHR.GE.1H0).AND.(CHR.LE.1H9)) GOTO 40
	WRITE(16,3) CHR
3	FORMAT('  CORRECTION CARD ERROR -- ILLEGAL CHARACTER ',A1)
	N=99999
	M=0
	IF(L.NE.-2) L=0
	RETURN
40	ZERO=1H0
	ID=CHR[0:6]-ZERO[0:6]
	VAL=VAL*10+ID
	IF(ICOM.LT.1) N=VAL
	IF(ICOM.GE.1) M=VAL
	GOTO 2
30	ICOM=1
	VAL=0
	GOTO 2
20	L=L+1
	CALL FILES
	CALL FILUNS(1,'I',LUNSEC)
	RETURN
70	ISCT=0
	RETURN
50	SCH=5H     
	CALL GETCR(A,IP,IC,CHR)
	IF(CHR.EQ.1H') GOTO 60
	SCH[0:6]=CHR[0:6]
	ISCT=1
	CALL GETCR(A,IP,IC,CHR)
	IF(CHR.EQ.1H') GOTO 60
	SCH[7:13]=CHR[0:6]
	ISCT=2
	CALL GETCR(A,IP,IC,CHR)
	IF(CHR.EQ.1H') GOTO 60
	SCH[14:20]=CHR[0:6]
	ISCT=3
	CALL GETCR(A,IP,IC,CHR)
	IF(CHR.EQ.1H') GOTO 60
	SCH[21:27]=CHR[0:6]
	ISCT=4
	CALL GETCR(A,IP,IC,CHR)
	IF(CHR.EQ.1H') GOTO 60
	SCH[28:34]=CHR[0:6]
	ISCT=5
60	L=-2
	N=99999
	M=0
	ICOM=1
	CALL GETCR(A,IP,IC,CHR)
	IF(CHR.EQ.1H') GOTO 2
	GOTO 222
	END
