C	PROGRAM NBSPOINT
C
C	BECAUSE I AM SETTING UP MY OWN NBSI AND NBSO FILES, I MUST
C	CORRECT THE POINTERS IN THE NBS*SEARCH PROGRAM.  THESE APPEAR
C	TO REPRESENT THE RECORD NUMBER AT WHICH A CHANGE OCCURS IN THE
C	"A" LATTICE CONSTANT.  THE VALUE OF "A" AND THE RECORD NUMBER
C	ARE RECORDED.
C
	INTEGER IA(60000),ENTRY,ASAVE(100),NSAVE(100)
	INTEGER*2 IAA(6),IAR(6),IAC(6),IVOLR
C
	DO 50 ICD=1,2
	ENTRY=0
	DO 2 I=1,100
	ASAVE(I)=0
	NSAVE(I)=0
2	CONTINUE
	IF (ICD.EQ.1) OPEN (UNIT=4,NAME='NBSI.BIN',FORM='UNFORMATTED',
	1 STATUS='OLD',ACCESS='DIRECT',RECL=32)
	IF (ICD.EQ.2) OPEN (UNIT=4,NAME='NBSO.BIN',FORM='UNFORMATTED',
	1 STATUS='OLD',ACCESS='DIRECT',RECL=32)
5	ENTRY=ENTRY+1
	READ (4,REC=ENTRY,ERR=15) IAA,IAR,IAC,IVOLR
	IA(ENTRY)=IAR(1)
	GO TO 5
15	ENTRY=ENTRY-1
	NSAVE(1)=1
	ASAVE(1)=IA(1)
	J=1
20	J=J+1
	N=(J-1)*1000-50
	IF (N.GE.ENTRY) GO TO 40
	IAS=IA(N)
30	N=N+1
	IF (N.GE.ENTRY) GO TO 40
	IF (IA(N).EQ.IAS) GO TO 30
	ASAVE(J)=IA(N)
	NSAVE(J)=N
	GO TO 20
40	ASAVE(J)=IA(ENTRY)
	NSAVE(J)=ENTRY
	IF (ICD.EQ.1) OPEN (UNIT=1,NAME='POINTI.DAT',STATUS='NEW',
	1 FORM='UNFORMATTED',ACCESS='SEQUENTIAL')
	IF (ICD.EQ.2) OPEN (UNIT=1,NAME='POINTO.DAT',STATUS='NEW',
	1 FORM='UNFORMATTED',ACCESS='SEQUENTIAL')
	WRITE (1) NSAVE,ASAVE
	CLOSE (UNIT=1)
	CLOSE (UNIT=4)
50	CONTINUE
	STOP
	END
