It was the fifth straight gain for the index. A measure of new orders rose slightly, while a gauge of production fell but remained at a high level. Factories added jobs, though at a slower pace than the previous month.