*     ************************************************************************

      subroutine sxnbu(xstat)

*     ************************************************************************

*     Purpose :
*     ---------

*     This routine modifies the status XSTAT to correspond to the
*     status of a nonbasic variable that is at his upper bound.
*     The nonbasic status supersedes the basic and the superbasic
*     status.

*     Parameter :
*     -----------

*     xstat   ( int )

*       input  : the status of the considered variable.
*       output : the updated status corresponds to the
*                status of a nonbasic variable that is
*                at his upper bound.

*     Routines used :
*     ---------------

*     None.

*     Programming :
*     -------------

*     D. Tuyttens 

*     ========================================================================

*     Routine parameter

      integer  xstat

      xstat = xstat - mod(xstat,8) + 3

      return
      end