On a special episode of "Dallas" on Dec. 13, 1979, Gary Ewing and Valene Clemmons Ewing remarried and moved to a California town called Knots Landing.

A week later, "Knots Landing" debuted as a series in its own right.Eleven years and 300 episodes later, Gary (Ted Shackelford) and Val (Joan Van Ark) are planning to remarry yet again tonight (9 p.m., Ch. 5). Whether that marriage will actually take place is for fans to find out.

But what is certain is that "Knots" is about to become the sole survivor of the prime time soaps - those glitzy, glamourous, sexy serials that dominated TV in the 1980s.

"Dallas" ends next week. "Falcon Crest" wrapped up last year. "Dynasty" is long gone. And lesser imitations like "Flamingo Road," "Bare Essence," "The Colbys" and "Emerald Point, N.A.S." bit the dust long ago.

But "Knots" is still going strong in its 12th season. As a matter of fact, it's the fourth-longest running drama in the history of television, behind only "Gunsmoke," "Dallas," and "Bonanza." It's already been renewed for next season, when it will move past "Bonanza."

What makes the survival of "Knots" all the more surprising is that it has weathered the ratings storms that have ravaged CBS since the mid-1980s. Among the shows it's been up against are "L.A. Law," "Cheers" and "Hill Street Blues" - and the soap ultimately vanquished the latter in the Nielsen wars.

What has made "Knots" a survivor while the more glitzy soaps have fallen by the wayside has a lot to do with exactly that - that "Knots" is less glitzy. We're not dealing with the poor here, but most of the characters are upper middle class. And even the rich ones have retained their middle class sensibilities.

Although overlooked by most critics and certainly by the Emmys, the writing on "Knots" is very good and the performances are as good as anything on "L.A. Law."

Amid the requisite kidnappings, murders, philanderings, split personalities and deep-dark secrets, "Knots" has taken on such serious and topical subjects as alcoholism, prescription drug abuse, teen drug abuse, mental illness, child abuse, divorce and bereavement.

Not that all the machinations are on the level of "Masterpiece Theatre," however. "Knots" could sometimes be as nuts as other soaps, including:

- The Trials of Karen Fairgate McKenzie (Michelle Lee), who has survived the death of her first husband, drug dependency, being shot, being kidnapped and being stalked by a crazed fan/serial killer.

- Greg Sumner (William Devane) and Paige Matheson (Nicollette Sheridan) playing strip croquet.

- Anne Matheson (Michelle Phillips) stealing money from a Salvation Army bucket while wearing designer clothes. And searching through puppy poop for missing microfilm.

- Abby's crooked lawyer having Val drugged into premature labor, then kidnapping the twins and telling Val they were dead.

- Abby (Donna Mills) thinking her daughter, Olivia (Tonya Crowe), killed Peter. Olivia thinking Abby did it. Abby burying Peter's body in the cement at a playground. The cement cracking. (And, all the time, Paige did it.)

- Two actresses returned after their characters were killed - Lisa Hartman played Ciji Dunne and look-alike Cathy Geary; Stacy Galina has been both Mary Catherine Sumner and her cousin, Kate Whittaker.

- Some great death scenes, including crazed TV minister Joshua Rush (Alec Baldwin) being screamed off the top of a building by his mother (Julie Harris), Chip Roberts (Michael Sabitino) being skewered by a pitchfork and Jill Bennett (Teri Austin) accidentally killing herself while trying to implicate ex-boyfriend Gary in trying to kill her.

And, of course:

- The Saga of Gary and Valene, who were first married when Gary was 18 and Val was 15. (Lucy of "Dallas" is their daughter.) Gary's a recovering alcoholic and compulsive gambler, while Val has suffered from split personalities and mental illness. Their second marriage broke up when Gary had an affair with Abby, but they've been in love ever since. They even produced twins while Gary was married to Abby and Val was married to Ben. One of Gary's girlfriends tried to murder Val, and Val's third husband, psycho-rapist Danny, tried to do the same to Gary.

But, tonight, love tries to conquer all - despite a fire at the Sumner building.

Stay tuned . . .