Angolan officials have told the United States they will try to prevent a recurrence of last month's attack by Katangese rebels living in Angola into Zaire's Shaba Province, official sources said yesterday.

Angolan officials passed this word to Ambassador Donald McHenry, who returned to the United States late Monday from a trip to Angola for consultations with that country's Marxist government.

McHenry's talks in Luanda were "good" and "constructive," according to U.S. officials, though the United States and Angola remained "poles apart" on the issue of Cuba's sizable military presence in Angola.

The Angolans told McHenry they were interested in preventing raids by Angolans rebels based in Zaire into Angola. Some officials have said that this concern could provide the basis for a mutual, Angolan-Zairian pact not to allow each country to be used as a base area for military forays into the other.

The McHenry mission into Angola was the first manifestation of the latest turn in U.S. Africa policy, and represents a new effort to deal cooperatively with the Luanda government instead of trying to isolate it. The United States has no formal diplomatic relations with Angola, and has said it will not establish them until the Cuban presence there is reduced.

As recently as early May, some Carter administration officials were exploring the possibility of supplying aid to Angolan rebels fighting a civil war against the Luanda government, as a means of "tieing down" Cubans in Angola.

President Carter said at his press conference Monday that "no responsible member" of his administration had seriously considered that course of action, however.

Officials said last night that there were no immediate plans for any follow-up to the McHenry mission, but they expressed hope that the Angolan-American dialogue will continue.

The United States now hopes that the Angolan authorities will contribute to a peaceful transition to majority rule in Namibia, the former South-west Africa, Angola's southern neighbor.

The relative success of the McHenry mission encouraged some officials to think that this may be possible. Sources said Angola has demonstrated its concern over Namibia by putting new restrainsts on rebel soldiers of the South West Africa People's Organization (SWAPO) who have used Angola as a base area.

The United States, officials said, sees the issues of the vulnerability of Shaba in Zaire, the use of Zaire as a base area by Angolan rebels and the future of Namibia as "all interlocked."

"If one moves, they all move, and Namibia would be a major touchstone if we could get a settlement this year," one official said.

Negotiations regarding the future of Namibia have resolved most of the outstanding issues, but lack of trust between SWAPO and South Africa, which has been administering the area under a League of Nations mandate, has stood in the way of a final settlement.

State Department strategists argue that successful negotiated resolutions of the disputes in Southern Africa are the best response to Soviet-Cuban advances in that region.