Axial impact between two elastic rods with piecewise constant characteristic impedance is considered. The distribution of characteristic impedance of the impacted rod and the impact velocity are given. By use of a 1D recursive algorithm, the characteristic impedances of the impacting rod are determined as long as they are all positive so that a prescribed impact force is realized. A condition for positivity of the characteristic impedance is derived in terms of transmission coefficients for wave energy. At the time from which positivity of all characteristic impedances cannot be maintained, or earlier, the characteristic impedance of the impacting body is continued, e.g., at the level of the last positive characteristic impedance or at level zero corresponding to cutting off the impacting rod. Examples of prescribed exponentially decreasing and linearly increasing impact forces are presented for a uniform impacted rod with constant characteristic impedance. In these examples, there is good agreement between the prescribed impact force and the impact force obtained from 3D FE simulation with a piecewise linear diameter of the impacting body that approximates the piecewise constant diameter obtained by use of the 1D recursive algorithm.