	SUBROUTINE CSM1
C	CONFIGURATION SPECIFICATIONS
	INTEGER TEST2,TEST9
	LOGICAL RSAC
	DIMENSION MTRX(75,5)
	COMMON REALS(395),INTS(547)
	COMMON/EXTRA2/TY(30)
	EQUIVALENCE (INTS(1),MTRX(1,1))
	EQUIVALENCE (INTS(526),TEST2)
	EQUIVALENCE (INTS(533),TEST9)
C	GET INPUT UNIT TEST2
	CALL INUNIT
	WRITE(4,10)
10	FORMAT(/10X,27HCONFIGURATION SPECIFICATION/)
	IF (TEST2.EQ.4) GO TO 40
C	NON-TTY INPUT
	WRITE(4,30)
30	FORMAT(40H BLOCK  TYPE   INPUT 1  INPUT 2  INPUT 3)
	GO TO 60
C	TTY INPUT
40	WRITE(4,50)
50	FORMAT(39H BLOCK, TYPE, INPUT 1, INPUT 2, INPUT 3)
C	INPUT STATEMENTS
60	I=KINPUT(0,IERR)
	IF (IERR) 400,70,340
70	IF (I) 340,400,80
80	IF (I.GT.75) GO TO 340
	J=0
	K=0
	L=0
	ATYPE=FINPUT(1,IERR)
C	SEARCH THROUGH PROGRAM LIBRARY FOR BLOCK TYPE ATYPE
	DO 90 M=1,30
	IF (ATYPE.EQ.TY(M)) GO TO 120
90	CONTINUE
C	TYPE IS NOT IN THE LIBRARY
100	WRITE(4,110) I
110	FORMAT(28H ILLEGAL BLOCK TYPE IN BLOCK,I3)
	GO TO 360
120	IF (IERR) 180,130,320
130	J=KINPUT(0,IERR)
	IF (IERR) 180,140,320
140	IF (IABS(J).GT.76) GO TO 320
	K=KINPUT(0,IERR)
	IF (IERR) 180,150,320
150	IF (IABS(K).GT.76) GO TO 320
	L=KINPUT(0,IERR)
	IF (IERR) 180,160,320
160	IF (IABS(L).GT.76) GO TO 320
	IF (FINPUT(-1,IERR).NE.0.0) GO TO 320
C	LEGAL BLOCK, TYPE, AND INPUTS
180	IF (M.LE.10) GO TO (100,200,100,200,100,200,200,200,220,190),M
	N=M-10
	IF (N.LE.10) GO TO (190,200,200,200,200,200,210,220,210,200),N
	N=N-10
	GO TO (200,190,220,210,210,210,250,200,210,250),N
190	IF (J.GT.0) GO TO 320
200	IF (K.GT.0) GO TO 320
210	IF (L.GT.0) GO TO 320
220	IF (J.LT.0) GO TO 320
230	IF (K.LT.0) GO TO 320
240	IF (L.LT.0) GO TO 320
C	LEGAL STATEMENTS - STORE THE CONFIGURATION
250	MTRX(I,2)=J
	MTRX(I,3)=K
	MTRX(I,4)=L
	IF (TEST2.EQ.4.OR.RSAC(10)) GO TO 290
C	TELEPRINTER RECORD
	K=4
	DO 260 L=1,3
	IF (MTRX(I,K).NE.0) GO TO 270
260	K=K-1
	WRITE(4,280) I,ATYPE
	GO TO 290
270	WRITE(4,280) I,ATYPE,(MTRX(I,L),L=2,K)
280	FORMAT(3X,I2,5X,A1,3(6X,I3))
C	CHECK FOR BLOCK DELETION
290	IF (MTRX(I,1).NE.0) WRITE(4,300) I
300	FORMAT(15H PREVIOUS BLOCK,I3,8H DELETED)
	MTRX(I,1)=M
	IF (M.NE.30) GO TO 60
	MTRX(I,1)=0
	MTRX(I,5)=0
	GO TO 60
C	ILLEGAL STATEMENT
320	WRITE(4,330) I
330	FORMAT(15H ERROR IN BLOCK,I3)
	GO TO 360
C	ILLEGAL BLOCK NUMBER
340	WRITE(4,350) I
350	FORMAT(17H BLOCK NUMBER OF ,I7,11H IS ILLEGAL)
360	TEST9=-1
	GO TO 60
C	END OF CONFINURATION SPECIFICATION
400	TEST9=0
	RETURN
	END
