      SUBROUTINE BTSLV(MO, M, N, A, B, C, X, IP, IERR)
      INTEGER MO, M , N, IP(M,N)
      REAL A(M,M,N), B(M,M,N), C(M,M,N), X(1)
C
C     DECOMPOSE THE COEFFICIENT MATRIX
C
      IF (MO .NE. 0) GO TO 10
      CALL DECBT(M, N, A, B, C, IP, IERR)
      IF (IERR .NE. 0) RETURN
C
C     SOLVE THE SYSTEM OF EQUATIONS
C
   10 CALL SOLBT(M, N, A, B, C, X, IP)
      RETURN
      END
