Complex sentence: They spent most of their years in service on the mainline between Transvaal and Natal and, by 1946, were mainly employed working between Pretoria and Johannesburg.
Split into simpler sentences: They spent most of their years in service on the mainline between Transvaal and Natal. By 1946 they were mainly employed working between Pretoria and Johannesburg.