          JOBS = 'V'
               CALL DGEES( JOBS, 'Not ordered', SELECT, N, T, LDT, SDIM,
     $                     DWORK(1), DWORK(N+1), U, LDU, DWORK(2*N+1),
     $                     LDWORK-2*N, BWORK, INFO3 )
               IF( INFO3.NE.0 ) THEN
                  WRITE ( NOUT, FMT = 99996 ) INFO3
                  STOP
               END IF
            END IF
*
            IF ( LSAME( LYAPUN, 'R' ) ) THEN
               IF( LSAME( TRANA, 'N' )  ) THEN
                  TRANAT = 'T'
               