* PACKAGE LGLU1T  !" $B@~7?2r@O(B : LU $BJ,2r$K$h$kO"N)J}Dx<0$N2r%F%9%H(B
*
*"  [HIS] 93/07/10(takepiro) $B!V9TNs7W;;%=%U%H%&%'%"!W;HMQ(B(GLU1)
*
**********************************************************************
      PROGRAM SVDT
*
#ifdef SYS_IBMS
      INCLUDE   (ZCDIM)                      !" 
      INCLUDE   (ZLDIM)                      !" $B3J;RE@?t(B, $BGH?t(B
#else
#include        "zcdim.F"                    !" 
#include        "zldim.F"                    !" $B78?t9TNs$NBg$-$5(B
#endif
*
      REAL    A(MATDMX,MATDMX), B(MATDMX)
      INTEGER MATDIM, IERR, I, J
      PARAMETER ( MATDIM = 3 )
*
      A( 1, 1 ) = 1 
      A( 1, 2 ) = 1 
      A( 1, 3 ) = 1 
*
      A( 2, 1 ) = 2 
      A( 2, 2 ) = 0 
      A( 2, 3 ) = -1 
*
      A( 3, 1 ) = 0 
      A( 3, 2 ) = 1 
      A( 3, 3 ) = 2 
*
      B( 1 ) = 3
      B( 2 ) = 1
      B( 3 ) = 0
*
c$$$      A( 1, 1 ) = 0
c$$$      A( 1, 2 ) = 0 
c$$$      A( 1, 3 ) = 0 
c$$$*
c$$$      A( 2, 1 ) = 0 
c$$$      A( 2, 2 ) = -2 
c$$$      A( 2, 3 ) = 1 
c$$$*
c$$$      A( 3, 1 ) = 0
c$$$      A( 3, 2 ) = 1
c$$$      A( 3, 3 ) = -2 
c$$$*
c$$$      B( 1 ) = 0
c$$$      B( 2 ) = 3
c$$$      B( 3 ) = 0
*
      WRITE ( 6, * ) 'SOLVE   A X      = B '
      DO 10 I = 1, MATDIM
         WRITE ( 6, * ) ( A(I,J), J=1,MATDIM ), B(I)
 10   CONTINUE 
*
*             SOLVES SIMULTANEOUS LINEAR EQUATIONS
*
      CALL LSVDSL
     M       ( A   , 
     M         B   ,
     O         IERR   , 
     I         MATDIM , .TRUE. )
*
      IF( IERR.EQ.0 )  THEN
         WRITE ( 6, * )' SOLUTION '
         DO 100 I = 1, MATDIM
            WRITE ( 6, * ) B(I)
 100     CONTINUE 
*
*
         B( 1 ) = 1
         B( 2 ) = 0
         B( 3 ) = 0
         CALL LSVDSL
     M       ( A   , 
     M         B   ,
     O         IERR   , 
     I         MATDIM , .FALSE.  )
         WRITE ( 6, * )' SOLUTION '
         DO 110 I = 1, MATDIM
            WRITE ( 6, * ) B(I)
 110     CONTINUE 
*
      ELSE
         WRITE(6,*) ' ERROR OCCURED IERR : ', IERR
      END IF
*
      STOP
      END
