  We calculate analytically the flavor non-singlet $O(\alpha_s^2)$ massive
Wilson coefficients for the inclusive neutral current non-singlet structure
functions $F_{1,2,L}^{ep}(x,Q^2)$ and $g_{1,2}^{ep}(x,Q^2)$ and charged current
non-singlet structure functions $F_{1,2,3}^{\nu(\bar{\nu})p}(x,Q^2)$, at
general virtualities $Q^2$ in the deep-inelastic region. Numerical results are
presented. We illustrate the transition from low to large virtualities for
these observables, which may be contrasted to basic assumptions made in the
so-called variable flavor number scheme. We also derive the corresponding
results for the Adler sum rule, the unpolarized and polarized Bjorken sum rules
and the Gross-Llewellyn Smith sum rule. There are no logarithmic corrections at
large scales $Q^2$ and the effects of the power corrections due to the heavy
quark mass are of the size of the known $O(\alpha_s^4)$ corrections in the case
of the sum rules. The complete charm and bottom corrections are compared to the
approach using asymptotic representations in the region $Q^2 \gg m_{c,b}^2$. We
also study the target mass corrections to the above sum rules.
