In war, a brave attack thrown back with heavy casualties can be seen not as a tactical misjudgment but as a gallant effort, well worth trying. American forces never "retreat," as I recall the official reports; they "withdraw to previously prepared positions."

Not so with failed diplomacy; scarcely anybody says "nice try." "Retreat" spells "defeat," which is politically unacceptable. There lies the cause of the muddle in what now passes as a U.S. policy for South Africa.

The Reagan administration cannot bring itself to admit that its strategy of "constructive engagement," however creative in concept, has been overtaken by events. Jimmy Carter tried candor when the Soviets invaded Afghanistan and shattered the underlying premise of his approach to the Soviet Union -- and look what happened to Carter.

So the Reagan crowd clings doggedly to a slogan that sounded sensible when it showed faint signs of achievement but can no longer be defended while the condition of the mass of black South Africans proceeds brutally from bad to worse. Absent an administration show of willingness to entertain alternatives, Congress can hardly be faulted for moving into a vacuum with its own -- a mishmash of economic sanctions.

The result: instead of convincing U.S. policy, what is on display for the world at large is a politically partisan scramble for the moral high ground on a matter in which morality is not an American issue. It is a South African issue; if the white supremacists in Pretoria gave a damn about morality they would not be tightening the screws of apartheid.

And yet, if you were looking at the collective performance of the U.S. government in recent days from the perspective of the powers-that-be in South Africa, you would be wondering what you had to worry about. You know well that Americans are outraged by the killings, the jailings and the tightening repression. But what do you see?

You see the House of Representatives voting overwhelmingly for relatively modest and selective economic sanctions, with the promise of a gradual tightening if the South Africans do not shape up in one or another way within a year. You hear this action described by the chairman of the House Foreign Affairs Committee as "a moral statement that far exceeds economic leverage." And then you see the Senate knuckling under to the threat of a filibuster and putting off its own vote until September, after it has had a vacation.

Finally, you hear the White House threatening that the president will veto the bill in any case and seek to regain the political initiative by using executive authority to impose sanctions.

That's not exactly carrying a big stick. It's not even speaking loudly with one voice. Rather, it's a classic case of competition for domestic political advantage making mush out of an important piece of U.S. foreign policy. The mush gets even mushier when you reflect on the dismal history of economic sanctions as a conclusive instrument of policy. At most the effects have been marginal, symbolic and rarely decisive.

At various times and in various ways, U.S. economic pressure has been applied to Libya, Iran, Iraq, South Yemen, Syria, North Korea, Cambodia, Cuba, Poland -- and even South Africa. Herewith, some random blurbs: James R. Schlesinger, former secretary of defense and energy, and CIA director (in 1980): "Economic sanctions are a relatively weak tool. They appeal to Americans because they seem to be a substitute for the stiffer measures that may be required." Helmut Sonnenfeldt, former State Department counselor: "Really airtight policies of denial have proved to be politically infeasible in virtually all countries where they have been attempted over the last several decades." Andrew Young (while serving as U.S. ambassador to the United Nations): "Economic sanctions look like an easy answer, but South Africa is one of the most self-sufficient nations in the world. It could get along without us."

As mayor of Atlanta, Young now takes a more positive line, arguing for a cutoff of airline service to South Africa, while conceding that effective sanctions would have to include "the Europeans and the Japanese -- the developed world." But with the notable exception of France, the Europeans have just recently shown themselves to be weakly divided and uncertain about how far they are prepared to go.

True, a crushing, comprehensive, economic squeeze might give the South African government self-serving second thoughts. But "graduated measures," as envisaged in the congressional legislation, can be treacherous. Under pressure, resistance is likely to harden rather than soften. The pressure must then be toughened and broadened, making it increasingly difficult to sustain with international backing. At the end of the road, theoretically, lies a physical blockade -- which is to say an act of war.

If the United States is ready even to start down this road, the recent performance of Congress and the executive is at worst a dangerously indecisive way to demonstrate the necessary national resolve. At best, it is no more than a clumsy expression of frustration over a problem the United States could hope to ameliorate but cannot hope to solve.