When the dependency ratio inactive/active increases to intolerable proportions, the question arises as to how and when pay-as-you-go social security systems can be controlled so as to safeguard a decent way of life to everyone. Between uncertainty linked to wages and the interest rate, and room to manoeuvre the age of retirement and the immediate transfer from workers to pensioners, not just any route permits this objective. The set of those which do is here delineated (the viability kernel tube), and the operations at any time necessary to control trajectories so as they remain in this set are identified (the regulation map). Finally, the flexibility necessary to avoid failure, from any state reached by the pay-as-you-go system, is inferred in timing and magnitude.