Perturbation techniques based on Lie transforms as suggested by Deprit were used as the theoretical foundation for programming the analytical solution of the Main Problem in Satellite Theory (all gravitational harmonics being zero except J2). The collection of formulas necessary and sufficient to construct an ephemeris is given. Short and long period displacements, as well as the secular terms, have been obtained up to the third order in J2 as power series of the eccentricity. They result from two successive completely canonical transformations which it has been found convenient not to compose into a unique transformation. Division by the eccentricity appears nowhere in the developments--neither explicitly nor implicitly. The determination of the constants of motion from the initial conditions has been given an elementary solution that is both complete and explicit without being iterative. (Author).