      SUBROUTINE BPOSE(A,KA,M,N,ML,MU,B,KB)
C     ******************************************************************
C     TRANSPOSITION OF REAL BANDED MATRICES
C     ******************************************************************
      REAL A(KA,1),B(KB,1)
C
      L = ML + MU + 1
      LP1 = L + 1
      IF (MU .EQ. 0) GO TO 40
C
C     DEFINING THE FIRST MU COLUMNS OF B
C
      NDIAG = MU
      DO 31 J = 1,MU
      LJ = LP1 - J
C
      DO 10 I = 1,NDIAG
   10 B(I,J) = 0.0
C
      IMAX = MIN0(M,N-NDIAG)
      DO 20 I = 1,IMAX
      II = NDIAG + I
   20 B(II,J) = A(I,LJ)
C
      IF (II .EQ. N) GO TO 31
      IMIN = II + 1
      DO 30 I = IMIN,N
   30 B(I,J) = 0.0
   31 NDIAG = NDIAG - 1
C
C     DEFINING THE REMAINING COLUMNS OF B
C
   40 JMIN = MU + 1
      NDIAG = 0
      DO 61 J = JMIN,L
      LJ = LP1 - J
C
      IMAX = MIN0(M-NDIAG,N)
      DO 50 I = 1,IMAX
      II = NDIAG + I
   50 B(I,J) = A(II,LJ)
C
      IF (IMAX .EQ. N) GO TO 61
      IMIN = IMAX + 1
      DO 60 I = IMIN,N
   60 B(I,J) = 0.0
   61 NDIAG = NDIAG + 1
      RETURN
      END
