Like the old Warner Bros, musicals of the '30s, "A Year at The Top," premiering on CBS tonight gets much of its energy and its excuse for charm from the combined talents of young upstarts and old fogies in the cast. It might have been called "Golddigers of 1977."

"Year" has taken at least two years to go from concept stage to the air, if not the top and its premise - the devil tradings souls for fame - hasn't been what you'd call fresh in 20 years. But the show still has a vitality and friendly clownishness that makes comings, like finding a Dairy Queen in Death Valley.

The show premieres with two half-hour episodes back-to-back tonight at 8 on Channel 9. Four additional episodes will air on subsequent Fridays at 8:30.

Unfortunately for all concerned Mickey Rooney stars only in tonight's two shows (though taped inserts of him have been added to the later ones). These were taped about six months ago, after "Year" had already gone through several incarnations and was heading for more. The property has a checkered striped and polka-dotted history. Two years ago at noon on Thanksgiving Day NBC showed a pilot version called "The Hereafter." It was about a bunch of old-timers who sold their souls to become flashes in the great pan of rock 'n' roll.

"Nobody saw that show but Norman," says a spokesman for Norman Lear who produced it. It didn't raise any roofs. Months went by, the show was rewritten completely recast and then peeked out of the bullpen hesitantly last January to fill a void left by a departing CBS flop. At the las minute the show was withdrawn and Lear's minions went back into rewrites.

After all of that you might expect a perfected gem. Don't. The edsel must have gone through rewrited too. But "Year" which is now about a pair of kids who sell their souls for 12 months of fame, has enough going for it to make it likely as a replacement for a CBS flop to come.

Most of the fun on the first two shows is contributed by Rooney and veteran actor Gabriel Dell. Rooney plays the wary guardian of the kids and Dell is the son of the Devil, operating out of a pruriently plush office in L.A. When his father demands two more souls at once, Dell pleads into his red telephone. "But Dad, we're in Hollywood. We've got almost everybody here already."

Some viewers may object to Dell's flamboyant swishiness in the part, but he has such a good time pronouncing "Boise" as "Bwa - zay" that he's pretty hard to resist it's a superb and sustained fame characterization.

Rooney meanwhile reels with the requisite short jibes like a longtime scrapper which he is and gives his character the sense of skeptical wisdom that sometimes comes to people whose lives have been something of a mess.

Though Rooney is making a movie in Canada and will be phased out of the show his replacement offers great hope. Needra Volz, 63, appears as Rooneys's mother on tonight's show and will assume his role as exorcist when he leaves. Her scenes are knockabout and hilarious in a way that recalls the pure slapstick of TV comedy in the '50s.

The two boys who go for ultimate broke are played by Greg Evigan and Paul Shaffer, but they are both unstaged on the opener by Priscilla Lopez, a chorusline columns, as a brassy Broadway babe in arms. Lopez like Rooney, went on to other commitments after taping the pilot, and her character will be replaced in future shows.

The songs, some by Evigan and Shafter are harmlessly humdrum, but a ballad in the second half. "We're Lovers After All" (by Rob Heggel and Carol George), is truly a beauty and flowingly performed Casablanca Records is releasing today an album of songs from the show "Greg and Paul."

It's a big plus that the show really is a musical comedy. Writer Sandy Zeith's joke lines have the usual number of the misfires and groaners. (The devil complaining about too few nightmares is far too reminiscent of "Damn Yankees" and the show is close enought to that as it is. But the songs come as welcome interruptions to the blam-blam sitcom gag rhythm.

Good as "Year at the Top" pretty much is, it remains perturbing that its past problems couldn't have been worked out at the script stage. And as usual, it's a little astonishing how many people share credit for such elemental inspiration: the show was "created by" Woody King "developed by" Norman Lear, "produced by" Darryl Hickman, and the rock segments were "developed in association with" Don Kirshner. Somehow, too many cooks have managed to come up with an appetizing broth.