      INTEGER FUNCTION MCSORT_CH_ORDER(I,INDX,MAXN,CHDATA,CHELEM)
C
C  ORDER RULE FUNCTION FOR *CHARACTER* DATA
C
      INTEGER INDX(MAXN)	! DATA SORT ORDER
      CHARACTER*(*) CHDATA(MAXN)	! CHARACTER DATA ARRAY
      CHARACTER*(*) CHELEM	! CHARACTER ELEMENT TO BE COMPARED
C
      INTEGER I		! POINT OF COMPARISON
C
      II=INDX(I)
      IF(CHELEM.LT.CHDATA(II)) THEN
        GO TO 10
      ELSE IF(CHELEM.GT.CHDATA(II)) THEN
        GO TO 30
      ELSE
        GO TO 20
      ENDIF
C
 10   CONTINUE
        MCSORT_CH_ORDER=-1
        GO TO 100
C
 20   CONTINUE
        MCSORT_CH_ORDER=0
        GO TO 100
C
 30   CONTINUE
        MCSORT_CH_ORDER=+1
        GO TO 100
C
 100  CONTINUE
      RETURN
      END
