Blake Treinen escaped a ninth-inning jam and the Dodgers beat Atlanta 5-3 on Monday to get within 1½ games of first-place San Francisco in the NL West.