  In recent three--loop calculations of massive Feynman integrals within
Quantum Chromodynamics (QCD) and, e.g., in recent combinatorial problems the
so-called generalized harmonic sums (in short $S$-sums) arise. They are
characterized by rational (or real) numerator weights also different from $\pm
1$. In this article we explore the algorithmic and analytic properties of these
sums systematically. We work out the Mellin and inverse Mellin transform which
connects the sums under consideration with the associated Poincar\'{e} iterated
integrals, also called generalized harmonic polylogarithms. In this regard, we
obtain explicit analytic continuations by means of asymptotic expansions of the
$S$-sums which started to occur frequently in current QCD calculations. In
addition, we derive algebraic and structural relations, like differentiation
w.r.t. the external summation index and different multi-argument relations, for
the compactification of $S$-sum expressions. Finally, we calculate algebraic
relations for infinite $S$-sums, or equivalently for generalized harmonic
polylogarithms evaluated at special values. The corresponding algorithms and
relations are encoded in the computer algebra package {\tt HarmonicSums}.
