      SUBROUTINE RJSTR (CSTR1,NBEG1,NLEN1,CSTR2,NBEG2)
C
C     RIGHT JUSTIFYS A STRING (CSTR1) INTO CSTR2
C
      CHARACTER CSTR1*(*), CSTR2*(*)
C
      CALL LFLNB (CSTR1,NBEG1,NLEN1,I,J)
C
      IF (I.LE.0) THEN
      CALL CHRBLK (CSTR2(NBEG2:NBEG2+NLEN1-1))
      RETURN
      ENDIF
C
      NEND2 = NBEG2 + NLEN1 - 1
      K = NEND2 - J + 1
      N = I + J - 1
      CSTR2(K:NEND2) = CSTR1(I:N)
      K = K - 1
      IF (K.GE.NBEG2) CALL CHRBLK (CSTR2(NBEG2:K))
C
      RETURN
      END
