  The structure function of a heavy quark in a heavy hadron in
electroproduction is calculated from QCD. Its deviation from the parton model
prediction (a delta function) is shown to be governed by a shape function,
similar to the one recently proposed by Neubert and Bigi {\em et al.} to
describe the end-point behaviour of the lepton spectrum in semileptonic $B\to
X_ue\bar\nu$ decays and the line shape in $B\to X_s\gamma$. Two new sum rules
are derived which extend the Bjorken-Dunietz-Taron sum rule by including
corrections suppressed by the inverse heavy quark mass.
