	SUBROUTINE SECODE (BPRMPT,ICODE)
C SET COMPOUND CODE BITS
C
C	BPRMPT		PROMPT ASKING FOR CODES
C	ICODE		WORD RETURNED WITH FLAG BIT VALUES SET
C
C	CALLED BY:	SEELEM
C	CALLS:		NONE
C	LIBRARY:	IBLEN
C
	INCLUDE 'SEARCH.INC'
	DIMENSION BPRMPT(1),BLINE(10),BCODES(7)
C CODES: MINERAL,DELETED,HYDRATE,ORGANIC,SPACE .NE.,AMMONIA,ALLOY
	DATA BCODES/'M','D','H','O','N','A','L'/
5	WRITE (ILUO,10) (BPRMPT(I),I=1,IBLEN(BPRMPT))
10	FORMAT (
     *	  ' CODES: MINERAL(M), AMMONIA(A), HYDRATE(H), DELETE(D), ',
     *	  'ALLOY(L)'/' PLEASE ENTER CODES THAT MUST ',20A1)
	READ (ILUI,20) IN,(BLINE(I),I=1,IN)
20	FORMAT (Q,10A1)
C SET THE APPROPRIATE CODE BITS IN ICODE
	IF (IN .EQ. 0) THEN
	  ICODE = 0
	ELSE
	  DO 50 I=1,IN
	    DO 40 J=1,7
	      IF (BLINE(I) .EQ. BCODES(J)) THEN
	        ICODE = ICODE .OR. IBITS(J)
	        GOTO 50
	      END IF
40	      CONTINUE
	    WRITE (ILUO,*) 'INVALID CODE'
	    GOTO 5
50	  CONTINUE
	END IF
	RETURN
	END
