Iranian President Abol Hassan Bani-Sadr yesterday cabled U.N. Secretary General Kurt Waldheim formally approving the dispatch of a commission to Tehran to investigate the alleged crimes of the deposed shah, Foreign Ministry officials said in Tehran.

Last night, Waldheim reported that he had not yet received the message from Iran and withheld an announcement that would launch the panel.

Earlier, Iran's revolutionary leader, Ayatollah Ruhollah Khomeini, named Bani-Sadr chief of the armed forces, saying the appointment was aimed at "consolidating power in Iran at this critical moment." The move was seen as significantly expanding Bani-Sadr's powers and giving him added leverage in the power struggle with the militant students holding about 50 hostages at the U.S. Embassy.

Meanwhile, both Bani-Sadr and Foreign Minister Sadegh Ghotbzadeh ruled out the release of the hostages until the U.N. commission had completed its work.

Ghotbzadeh, in a news conference in Paris before returning to Iran, stressed that the U.N. commission was merely the first step in solving the hostage situation. Waldheim had been quoted in Vienna as saying the hostages could be released in two weeks through the work of the commission.

"It is not the plan we agreed upon," Ghotbzadeh said of Waldheim's statement. "There is no point of even talking about the hostages in the course of the commission's work. The commission must finish its work separately from the hostages. I certainly do not share [Waldheim's] opinion, if it is his opinion."

Meanwhile, the commission's members were scheduled to gather for consultations in Geneva by today. A U.N. spokesman there said a chartered plane had been readied to take them to Tehran.

Two members of the five-member inquiry panel, Sri Lankan lawyer Hector Jayewardene and Syrian presidential adviser Adib Daoudi, were already in Geneva, U.N. sources there said.

The other members, identified by reliable U.N. sources as Algeria's U.N. Ambassador Mohammed Bedjaoui, Venezuelan member of the Inter-American Human Rights Commission Andres Aguilar and French jurist Louis-Edmund Pettiti, were expected to arrive in Geneva this morning.

Speaking to journalists yesterday after a meeting of the ruling Revolutionary Council, Bani-Sadr said Ayatollah Khomeini had approved the creation of a commission a week ago.

The commission will inquire into "the crimes of the ex-shah and American intervention in Iran," Bani-Sadr said.

Asked if Iran had approved a package that would include the release of the hostages held by the Moslem militants at the occupied embassy since Nov. 4, the president said, "That is for afterwards."

Aguilar told an associate that he expects the commission's inquiry to be finished by the end of the month, Washington Post correspondent Michael Weisskopf reported. He said the panel would take testimony but not issue a report until there is "expressed commitment" from Iran that the hostages would be released.

Despite the conflicting statements from Iranian officials and the embassy militants in recent days, American officials said the delicate diplomatic process was continuing on course.

In turning over his powers of armed forces chief, the 79-year-old Khomeini told Bani-Sadr, in a statement issued from his hospital bed: "As this sensitive stage, when we need centralization of power more than at any other stage, you, as my representative, are appointed commander in chief of the armed forces as defined in the constitution of the Islamic republic."

The ayatollah, delegating his constitutional powers, urged Bani-Sadr to use the position to reform the armed forces along Islamic lines.

Khomeini already had made Bani-Sadr head of the ruling Revolutionary Council and urged Iranians to support the council.

Bani-Sadr's appointment followed a five-day sit-in at Tehran University Mosque by disgruntled airmen demanding a purge of senior officers and the creation of Islamic armed forces councils, similar to those formed by other Iranian workers.

The protestors, who ended their occupation Monday with a threat of more action if Bani-Sadr did not meet their most urgent demands within a week, received an assurance from Ayatollah Khomeini Monday night that their grievances would be investigated.

Bani-Sadr's first move as head of the military was to call for a purge and reorganization of its ranks, Tehran radio said late yesterday.

"The Army needed to be purged, but the purge must be carried out fairly," Bani-Sadr said in a recorded message broadcast to the Iranian armed forces.

He said the purge would be carried out as soon as possible with decisiveness and so that only those who have to be purged actually are purged."