SAN FRANCISCO (AP) — Matt Cain pitched seven innings and had two hits and an RBI to lead the San Francisco Giants to a 6-0 win over the Arizona Diamondbacks on Wednesday night.Brandon Belt added three hits, Pablo Sandoval singled twice and drove in two runs, and Marco Scutaro extended his career-best hitting streak to 14 games while helping Cain to his career-best 16th win.It’s San Francisco’s first victory since clinching the NL West division for the second time in three years.The Giants were the fifth NL team to pitch a shutout Wednesday. The last time there were at least five shutouts in the same league on the same day was Sept. 18, 2003, in the NL, according to STATS LLC.Miguel Montero and Gerardo Parra had two hits apiece for Arizona, which only managed to get one runner past second base while losing for just the third time in 10 games.Cain (16-5) looked sharp in his next-to-last start in the regular season. The right-hander scattered four hits and had six strikeouts, two in the seventh when he pitched out of two-on, no-outs situation.It was exactly the type of outing San Francisco needed from its ace after two-time NL Cy Young Award winner Tim Lincecum was knocked around by the Diamondbacks a day earlier.Cain, who hasn’t lost since Aug. 6, lowered his ERA at AT&T Park to 2.03. He did it despite three Giants errors on a sloppy night defensively for both teams.Guillermo Mota, Jeremy Affeldt and Dan Otero combined for two innings to complete San Francisco’s 14th shutout of the season.The Giants scored twice off Diamondbacks starter Wade Miley (16-11) in the third on an infield hit by Sandoval and an RBI single from Buster Posey. Posey joined Walker Cooper (122 in 1947) and Dick Dietz (107, 1970) as the only other catchers in franchise history to reach 100 RBIs in a single season.Miley, Arizona’s prized left-hander who was attempting to become the first rookie in the NL to reach 17 wins since Cincinnati’s Tom Browning in 1985, didn’t last much longer.Belt tripled leading off the fourth and scored on Scutaro’s single. Brandon Crawford, who walked following Belt’s hit, later scored on Sandoval’s fielder’s choice grounder to give the Giants a 4-0 lead.Scutaro also doubled in the eighth and has the longest active hitting streak in the majors.Miley lasted just four innings, matching the shortest outing of his career. He allowed three earned runs with three strikeouts and three walks while losing to the Giants for the second time in two weeks.Cain singled and scored in the third then reached on an infield single in the fifth to drive in Hunter Pence and make it 5-0. Pence reached on a throwing error by Diamondbacks third baseman Cody Ransom.Paul Goldschmidt doubled leading off the seventh and moved to third on Parra’s single, but Cain worked out of the jam without much trouble. He struck out Ransom and John McDonald then got pinch-hitter Jason Kubel to ground out to third.Notes: Cain has gone at least seven innings without allowing an earned run in five of his 31 starts this season. ... San Francisco manager Bruce Bochy said the team will decide by Thursday whether or not to include suspended OF Melky Cabrera on its postseason roster. ... LHP Barry Zito (13-8) goes after his fourth consecutive win for San Francisco in the series finale. LHP Patrick Corbin (6-7) takes the hill for Arizona.