WHEN WE MEET John Francis Gawlor, the protagonist of Bruce Cook's cautionary, even disturbing novel, he is already dead -- beaten and stomped to death in a shabby Chicage room, just across the line from Evanston. Lying next to him is the strangled body of a 14-year-old youth. Both have been dead for days.

Assigned to investigate this mess is Detective Sergeant Joseph Melaniphy of Tenth District Homicide. After some routine investigation, Melaniphy decides that things don't quite add up. Gawlor was not your garden variety "sparrow-hawk" or pederast. Instead, he was the respectable, 43-year-old vice-president of a Michigan Avenue ad agency, the divorced father of two nearly grown daughters, and a known and even dedicated skirt-chaser.

Sergeant Melaniphy becomes mildly obsessed not with who killed Gawlor, but with how such an apparently stalwart citizen could come to such a rotten end. And that's what author Cook proceeds to tell us, in detail.

Cook's message seems to be that the American sexual jungle is a dangerous place to romp in for both male and female alike. There may be claims that he has written the male counterpart to Looking for Mr. Goodbar , and such a comparison might well be justified. For what Cook does is to trace the life of a repressed, sexually ignorant, not insensitive 17-year-old, the son of a too mild father and the usual dominant mother -- through high school, college, the army, career, marriage, divorce, and death. Sex and its pursuit are Gawlor's obsession, becoming ultimately his reason for being and, almost inevitably, his reason for dying.

The young Gawlor wanted to be a writer, of course -- one cast in the Hemingway mold. He takes creative writing at the University of Illinois and has his first real sexual encounter with a downstate, rural black whore -- a disastrous affair that he transforms into a saccharine tale for his creative writing class. This earns him praise from both his instructor and his future wife, a fellow student and also a writer of sorts.

While serving in the army in Frankfurt in 1958 Gawlor finds more prostitutes, and has his first successful sexual experience with the lame, German mistress of a Jewish bar owner who is a former concentration camp inmate. This is just the ironic stuff, he believes, from which literature is made. So when his father dies he goes back to Chicago on leave, marries his former creative writing classmate, and returns with her to Germany where they plan to serve out his time in the army, then live someplace cheap in Europe, and write.

Instead, Gawlor's wife becomes pregnant and that more or less ends his literary career. They return to Chicago and he eventually joins an advertising agency as a copy writer, soon rising to an executive position, but sneering at his new trade all the way.

And it is back in Chicago that Gawlor resumes his sexual adventures. He beds almost anybody he can find -- a junior copywriter; the woman real estate agent who sells him his house in the suburbs, and a formerly fat childhood acquaintance who has shed 100 pounds, had a nose job, and is now an oil company economist. He finally leaves his wife, takes an apartment in Evanston, and rents the shabby room just across the line in Chicago in which he carries on his sexual activities, which he now seems to regard almost as scientific experiments.

Finally, he discovers homosexuality, which may well have been what he was looking for all the time. By then Gawlor is content, almost pleased to think of himself as bisexual, a dedicated prober into the ultimate experience, whatever that may be. He inds precious little joy in sex and not much release. Yet he pursues it grimly until it leads to his death, which could be considered a form of suicide.

Interspersed among all this are brief chapters that concern Sergeant Melaniphy's efforts to find Gawlor's killer and to find for himself an understanding of the dead man. The killer is no surprise, and the sergent never quite gets a complete fix on Gawlor. But the reader does and this is Cook's considerable achievement.

Although no stylist, Cook writes a serviceable unadorned brand of English, curiously lacking in humor But then his protagonist is essentially a humorless man. At the end Gawlor has gone slightly mad and even hallucinaties, but he's still obsessed with sex, which for him remains a rather dirty mystery.

Cook provides us an excellent clue to the puzzle of Gawlor's quirky personality when he has him try to have a typist in the ad agency fired for saying a commonplace four-letter swear word. Although a dedicated libertine, Gawlor is still so repressed that he finds a woman's use of the word deeply offensive. Small wonder that he finally goes crackers.

Cook's novel is disturbing in the sense that it's depressing. It's a sad, barren tale that he tells us and even Gawlor at last seems to recognize this when he thinks: "Then and there, whatever warmth, whatever generosity he might have felt a moment before was suddenly replaced by a sense of rage -- anger and resentment that he found hard to disguise. It was rage at his life and the direction it had taken -- or perhaps that it had taken no direction at all, perhaps that was the problem."

Yes, perhaps it was.