IRVING, TEX., DEC. 27 -- A Dallas Cowboys' season hadn't ended on a winning note since 1980, so Everson Walls, who came to Dallas a year later, wasn't quite sure what to make of the 21-16 victory over St. Louis today.

"It makes you feel good. But I'd rather lose the last couple and go to the playoffs," Walls said. "It's frustrating to see that this is how we could have played all year long."

But in eliminating the Cardinals from playoff contention and tying St. Louis and Philadelphia for second place in the NFC East at 7-8, the Cowboys got a glimpse perhaps of how they can play next year. Winning consecutive games for the first time since mid-1986, they at least gave their fans -- all 36,788 who showed up on a clear, cold afternoon at Texas Stadium -- hope for the future.

With Herschel Walker running for 137 yards and two touchdowns and the offensive line not allowing a sack for the first time in 1987, the offense was productive if not spectacular. Same for a defense, which, while allowing Neil Lomax to throw for 314 yards, held him to less than six yards per throw and didn't allow a single completion for 25 yards or more in 54 attempts.

"We won the battle today," said safety Michael Downs. "They didn't get that many big plays, and that's what we had to stop."

Ultimately, the Cowboys' defense had to stop the Cardinals in the final two minutes from rallying and reaching the playoffs. St. Louis had a first and 10 at the Cowboys' 23 with a little more than two minutes to go. But after a one-yard run by Stump Mitchell, an incomplete option pass by Mitchell drew a 10-yard penalty for having an illegal man downfield. On second and 10, Lomax had to retrieve a snap that sailed far over his head, then threw incomplete for J.T. Smith. On third down, Jim Jeffcoat blew in from the right side to dump Lomax.

Finally, a desperate fourth-and-27 prayer launched into the right side of the end zone was batted down by Manny Hendrix, who played the entire game in place of injured rookie Ron Francis and made 10 tackles.

The team that benefitted most from the game was Minnesota, which won a wild-card spot as a result. The Cowboys started doing favors for the Vikings on Thanksgiving Day when they helped them to a 44-38 overtime victory here, then continued the last two weeks by eliminating first the Los Angeles Rams, then St. Louis from the race.

"I felt bad for {Cardinals Coach} Gene {Stallings} when I went across the field," Cowboys Coach Tom Landry said, "but that's football."

"This football team has made a lot of progress," said Stallings, searching for a silver lining. "We are a few football players away from being where we want to be."

Neither the Cowboys nor the Cardinals are where they want to be today. But Dallas is certainly closer to where it hopes it's going than it was two weeks ago.

Tony Dorsett, who said last week he wants to be traded, didn't play a down in what could have been his final appearance in Texas Stadium.

Dorsett didn't stay around after the game to comment.

Dorsett said earlier in the week he couldn't handle a backup role to Walker, and said he felt the game against the Cardinals would be his last as a member of the Cowboys. St. Louis 3 7 0 6 16 Dallas 0 14 0 7 21 First Quarter

StL -- FG Del Greco 32, 5:04 Second Quarter

D -- Walker 11 run (Ruzek kick), :03

D -- Walker 11 run (Ruzek kick), 13:06

StL -- Smith 2 pass from Lomax (Del Greco kick), 14:40 Fourth Quarter

StL -- FG Del Greco 28, 2:46

D -- Pelluer 5 run (Ruzek kick), 4:47

StL -- FG Del Greco 37, 9:27

A -- 36,788.

Cardinals Cowboys First downs 26 17 Rushes-yards 30-126 34-163 Passing yards 296 122 Return yards 31 64 Passing 28-55-1 10-22-0 Sacked-yards lost 3-18 0-0 Punts-average 4-40 7-35 Fumbles-lost 1-1 0-0 Penalties-yards 7-65 9-55 Time of possession 33:45

RUSHING -- St. Louis: Mitchell 22-91, Lomax 2-14, McAdoo 3-11, Wolfley 3-10. Dallas: Walker 25-137, Pelluer

PASSING -- St. Louis: Lomax 28-54-1, 314 yards, Mitchell 0-1-0, 0. Dallas: Pelluer 10-22-0, 122.

RECEIVING -- St. Louis: Smith 11-102, Green 7-112, Novacek 4-42, Wolfley 3-14, Mitchell 2-30, T. Johnson 1-