Outfielder Doug Frobel, playing in his first major-league game, lost a fly ball in the sun with one out in the 10th inning, allowing Ron Roenicke to score the run that gave the Dodgers a 2-1 victory over the Pittsburgh Pirates yesterday in Los Angeles.

With the victory, and Montreal's 2-1 win over Atlanta, the Dodgers moved within 1 1/2 games of the first-place Braves in the NL West.

Roenicke led off the 10th with a double off reliever Kent Tekulve (10-8) and went to third on Steve Garvey's sacrifice. Pinch hitters Jorge Orta and Candy Maldonado were intentionally walked and Rod Scurry replaced Tekulve.

Pinch hitter Greg Brock hit a high fly ball between Frobel and Lee Lacy in shallow right center field. Frobel lost the ball in the sun and it dropped about two feet in front of him for a single.

Tom Niedenfuer (3-2) pitched the last two innings to gain the victory.

The Dodgers tied the score at 1 in the eighth on a homer by pinch hitter Jose Morales, his first in the National League since 1977, when he played for Montreal. Starter Larry McWilliams had yielded only one hit before the homer.

Pittsburgh scored its run in the top of the inning. After Bill Madlock was robbed of a home run on a leaping catch by left fielder Dusty Baker, Jason Thompson and Richie Hebner singled. Thompson moved to third when Hebner was forced on Mike Easler's grounder and scored on Dale Berra's single.