      SUBROUTINE DXSAVE(X,DX,N,ND)                                      00000100
C     **********  =W82JS.DXSAVE  **********                             00000105
      INTEGER*2 N                                                       00000110
      INTEGER DX(1),X(1)                                                00000120
C                                                                       00000130
      K = 0                                                             00000140
      DO 20 I=1,N,ND                                                    00000150
      K = K + 1                                                         00000160
      DX(K) = X(I) - X(I+1)                                             00000170
      IF((X(I) .LE. 0) .OR. (X(I+1) .LE. 0)) DX(K) = 99999              00000175
  20  CONTINUE                                                          00000180
C                                                                       00000190
      RETURN                                                            00000200
      END                                                               00000210
