SHEILA KUEHL is busy getting ready to make the move back to California, and she spends all day studying for the bar exam she will take when she gets there next month. "It's probably best if you call late at night," she said last week from her Somerville, Mass., apartment. Still, the recent graduate of the Harvard Law School is not nearly as busy as she was almost 20 years ago, when as a UCLA sophomore named Sheila James she first started in the role of Zelda Gilroy in the CBS television show "The Many Loves of Dobie Gillis."

Kuehl was originally signed for only one show as Zelda, the high school genius who figured the way to Dobie's heart was through his brain - after all, it was "The Many Loves of Dobie Gillis" - but fans of the show found her character appealing, and writer Max Shulman liked her. In the show's second year she signed on as a regular, and played Zelda for "Dobie Gillis'" whole four-year run. Kuehl found the years between 1959 and 1963 very busy, sandwiching her studies around the show. During that time, "Dobie Gillis" was one of the most popular shows on television although Kuehl says now, "We never paid any attention to ratings."

"If you analyze the show, you'll find Max liked losers," she said, "But when they failed they just redoubled their efforts. It's like in the Kurt Vonnegut novel, "Slapstick" - they kept faith with their destines. That's a highfalutin word for a television comedy, but I think it's true."

"Max completed the character out of my life - he did that with all of us. In part that's why they were so easy to play. They were just extensions of us, slightly more Rabelaisian: he exaggerated us. I always smart, but Max took that and made me a genius." she said, and punctuated it with a laugh. "I've often wondered if that's how I got to be what I am, but I guess it's the tail wagging the dog."

By the time Sheila Kuehl met Max Shulman she was already a seasoned veteran of television. In 1950, at the age of 9, she had started in "Trouble With Father." When that ended in 1956 she free-lanced. But although some regulars from "Dobie Gillis" - most notably Warren Beatty, Tuesday Weld and Ronnie Howard - kept acting and moved on to motion pictures, Sheila Kuehl did not.

In 1964 she did 36 episodes of "Broadside," and after that the work began to get slim. "'Broadside' was terrible," she said, "and they don't want you if you're a loser."

Between 1965 and 1970 she had 12 jobs. "I don't know if 'Broadside' sink my career," Kuehl said, "but something did. I kept trying - I kept my agent for a really long time." In the meanwhile, she was working all kinds of jobs, even opening an advertising agency with a friend (it failed). "I was out of school and out of work for the first time in my life, and that was very scary," she said.

But also for the first time she had some control over her life. "Waiting for the phone to ring drove me batty. Then I realized nobody told me how to cut my hair, or what clothes to wear or what kind of car to drive. I began to rason that although I had a good time and made a lot of money, it was time to get out."

She began to looking for another job in 1971, and found it at her alma mater doing freshman orientation. A position opened, and Sheila Kuehl found herself an assistant dean, advising student groups and sitting in on student government as the administration representative. Later, she moved up to associate dean, but by 1975 it became apparent to her that to advance she needed an advance degree of some kind. Interested in legal rights of students anyway, Kuehl picked law school as the one that would giver her the most opinions.

Kuehl said she doesn't keep up with the cast of "Dobie Gillis." "There was a CBS pilot - 'Whatever Happened to Dobie Gillis?' - a year ago April. In the show Dobie and Zelda were married, and Duane Hickman (the actor who played Dobie) and I were in bed." She laughed. "Duane and I were never the same. He's quiet. I really don't know what everybody's doing, and now it's pretty much just Christmas cards." But Dobie Gillis fans still stop her twice a week, she said, "and the show's probably still on somewhere on Channel 476 at 3 in the afternoon."

In September her law career begins when Kuehl startw with a Los Angeles firm she said does mostly municipal law for California towns that can't afford a full-time city attorney. Established in that, "It's possible I'll run for the state assembley or the state senate, although 3,400 miles away I haven't got the information I need. Anyway, since Proposition 13 (the recent California referendum that sliced property taxes, and a big chunk out of the state's budget) who knows if there'll be a state?" Sheila Kuehl sighs. She also has to make some money. At 37, the money from "Dobie Gillis" is long gone, and she owes Harvard $12,000 in loans on her education.

What the law has taught her, Kuehl says, is what it's possible to change in the ways society is structured - "how it might be possible to change the great discrepancy in wealth for the people who don't have any," she put it. Kuehl insisted that again she was too far away to decide immediately about Proposition 13, but said, "I want to provide services for people who need them, not pick purses of people who have as much money as Howard Jarvis."

She still watches television, mostly "Saturday Night Live," and re-runs of "Star Trek" and "The Mary Tyler Moore Show," which she calls "the best comedy show ever."

"When I started in television in 1950, comedy was two-dimensional and unrealistic. Where people took television seriously enough to criticize it, they said the shows set a bad example - you know, the bumbling father, the catty mother, everything exaggerated - but then other people said, 'Wait, maybe it's that way on TV because it's that way.' I know for me, television was the first place I saw a woman out of the kitchen, and it was the first I thought about getting out of the kitchen."

Sheila Kuehl sighed again. "That's not the most intellectual answer I can give, but it is the truth."