Illegal immigration across the border of Mexico and the United States would appear to be a manageable as well as compelling movie subject. Nevertheless, the evidence continues to suggest that well-meaning filmmakers can't lick this particular provocative subject. "The Border," now at area theaters, has more going for it, especially from the acting end, than either the Charles Bronson vehicle "Borderline" or Robert M. Young's independent feature, "Alambrista," but it also fails to keep human interest and melodramatic calculation in effective proportion.

Judging from the misshapen, erratic nature of the scenario, the three screenwriters credited for "The Border" -- Deric Washburn, Walon Green and David Freeman -- couldn't have been laboring under a unified or coherent vision. It's possible that we've ended up watching fragments from three scripts that took radically different approaches to a common plot, the story of a conscience-stricken Border Patrol officer, Charlie Smith, who joins a unit riddled with corruption, reluctantly plays along and then tries to make amends by assisting an "illegal" who becomes a sentimental obsession -- a widowed young woman whose infant is stolen while she's detained in a Border Patrol compound.

Jack Nicholson stars as Charlie, projecting an appealing sort of motley chivalry. He's an unsuccessful, weary, degraded man, an obvious loser ennobled by a fundamental core of decency. Getting nowhere with an enforcement job in the Bureau of Immigration and Naturalization in Los Angeles, Charlie permits himself to be dragged to El Paso by his sexpot, birdbrain wife Marcy (Valerie Perrine), who has an old chum with a husband in the Border Patrol and an empty residence right next door.

The pal, Savannah, turns out to be a hilariously shameless slut, impersonated with zesty humor by Shannon Wilcox. The husband, Cat, turns out to be an earnestly dishonest lawman, persuasively embodied by Harvey Keitel. Charlie finds himself in a unit where the corruption is institutionalized. The captain, Red, played by Warren Oates, is on the take, and Cat more or less oversees the supply of some illegals to employers willing to pay bribes for cheap labor. Charlie resists Cat's initial overtures to share a piece of the action, and Cat doesn't press, since he prides himself on having strict standards -- he doesn't mind smuggling laborers but he refuses to wink at drug smuggling. "I can respect that," Cat says.

Charlie supposedly weakens because of Marcy's acquisitiveness: He needs the crooked money to pay the bills his wife keeps piling up. Unfortunately, this explanation calls attention to one of the more glaring discords in the presentation. The tone of the domestic scenes belongs to bedroom farce. Whenever Valerie Perrine or Shannon Wilcox are in camera range, the dizzy dame motif is so pronounced that "The Border" might as well be a pilot for a new situation comedy about the misadventures of two wacky, oversexed Texas housewives. In fact, I wouldn't mind seeing a comedy pilot built around Shannon Wilcox.

However, "The Border" is supposed to be a serious melodrama, so it's definitely an esthetic blunder to permit an utterly facetious tone on the home front while emphasizing grim reality on the job. Moreover, the filmmakers keep upping the bet on their melodramatic cards. Cat's discreet, believably rationalized form of corruption takes a ruthless leap: Cat is also a coldblooded killer. Charlie's attempt to rescue the kidnaped baby is oddly slow to develop and then manipulated for a slambang finish, with the hero compelled to drive through an ambush of murderous colleagues before he can restore the child to its mother, a figure saturated with symbolic overtones to begin with, thanks in part to the exquisite Madonna-like beauty of Elpidia Carillo.

Charlie's struggle to salvage a measure of honor from a squalid, compromised life is certainly worth rooting for, and Nicholson is distinctive enough to create an unconventional heroic figure out of this battered, frustrated public servant. If the movie were better coordinated, it might have emerged as as a memorable topical melodrama, at once gritty and stirring. The lack of coordination reduces it to the sort of movie that sends you away mumbling, "Why couldn't it have been a little better?"