South Africa's neighbors -- the "front line states" -- are trapped in an awful dilemma.

They are demanding of the world, through the United Nations, that economic sanctions be imposed on the racist regime in Pretoria. But privately they will be relieved if, as seems likely, that effort fails. They cannot afford sanctions. Their dependence on South Africa is too great.

Of Zimbabwe's overseas exports, roughly 95 percent move through South Africa's rail and port systems. The import pattern is the same. Zimbabwe's petroleum supplies come out of South Africa. Its railway system is heavily dependent on South African equipment. Its telecommunications system is tied into switching and relay centers in Johannesburg.

Other "front line" states are similarly enmeshed. South African technicians operate the critical port facilities in Mozambique and assist in railway operations. Immense quantities of hydroelectric power are exported from Mozambique to South Africa. South Africa in turn supplies the electrical power for Mozambique's largest city, Maputo. South Africa also provides 20 percent of Mozambique's imports and 25 percent of its foreign exchange. About 35,000 Mozambiquan workers are employed in South African mines.

South African grain feeds Zambians. South African railroad and ports move Zambian copper produced in mines jointly owned by the government and the Anglo-American Corp., a South African mining company. Its factories provide Zambia with industrial goods and clothing. Its financial institutions provide hard currency credits.

Malawi is an unabashed and grateful economic partner with South Africa, importing consumer goods ranging from wine to grain and industrial equipment of every description, including aircraft. Miners from Malawi dig gold in the South African fields, earning badly needed foreign exchange. South African technicians hold important posts in the Malawi government.

Tanzania, whose President Julius Nyerere is the ideological leader in the struggle against South African apartheid, operates diamond mines in partnership with the South African firm, Oppenheimer-deBeers. Zaire moves 60 percent of its copper and most of its imports through the South African transport system.

Overall, South Africa claims economic ties with 46 of the 53 black African states and these ties are expanding each year. South African exports to black Africa increased by 50 per cent between 1979 and 1980 -- from $959 million to $1.4 billion. Its imports from those countries grew from $333 million to $364 million in the same period. Zimbabwe is the major trading partner.

"Today," a Western diplomat in Salisbury said, "South Africa has them by the throat."

"We are their hostages," said an official in Prime Minister Robert Mugabe's government.

These relationships, in purely economic terms, are logical and necessary. They would, in fact, be expanded and strengthened in an ideal world that would see the creation of a strond and interdependent regional economy in Southern Africa. Today, however, ties with South Africa -- many of them still clandestine -- are politically embarrassing to all of black Africa and especially to the "front line states." They find themselves in the unwilling position of denouncing the abhorrent racial policies of South Africa while at the same time conducting, out of necessity, business as usual with the enemy.

In part, they are prisoners and victims of conditions over which they have no individual control. Zimbabwe, for example, is a landlocked state that must have access to the sea to survive. In theory, it could use the ports of Mozambique rather than those of South Africa. But the transportation system of Mozambique -- like the entire Mozambiquan economy -- is a shambles, incapable of handling the traffic involved.

Zambia is caught in the same vise. Its western neighbor, Angola, and its eastern neighbor, Tanzania, are coastal states. But again, the transportation systems are inadequate. The rail line through Angola is regularly cut by the guerilla forces of Jonas Savimbi. The rail line through Tanzania, built by the Chinese, is a narrow-guage Toonersville Trolley that functions sometimes and sometimes does not. Zaire is similarly afflicted.

There is a lot of talk here and in other "front line states" of ways out of this dilemma. A favorite solution is an investment of $1 billion or more by the United States and other Western countries to rehabilitate Mozambique's transportation system.

But Mozambique itself has effectively quashed that scheme. Its prime minister, Somora Machel, calls himself a Marxist, a label with uncertain meaning. He refuses, in any case, to do business with the major Western financial institutions. He will not join the World Bank or the International Monetary Fund or the Lome Convention underwritten by the European Economic Community. He has undercut relations with the United States by hostile acts, the most recent being an unsubstantiated charge that the American embassy in Maputo was "a nest of spies."

Thus, Machel has turned his back on potential Western help. As an alternative, he talks of joining with Comecon, the Soviet-Eastern European economic consortium. But Comecon has shown no interest in taking on another pauper client.The burdens of Cuba and Vietnam already strain its capacities. Instead, it has sent Machel cadres of East Germans and Cubans who provide minor technical assistance but no major economic support.

So the Mozambique solution is, for the foreseeable future, nothing but wishful thinking. Even if it were feasible, the dependency of the "front line states" on South Africa would not end. Zimbabwe aside, their economies are inefficient and distorted in ways that seem almost calculated to perpetuate their himiliating subserviance to South Africa.

There will be a great hue and cry about South African sanctions in the United Nations this month, with the "front line states" in the forefront of the rhetorical battle. But when the veto is cast in the Security Council by some lonely Western nation, the "front line states" will not be displeased.