A controversial D.C. government financial analyst who publicly accused his bosses of wrongdoing and recently changed a city treasurer's secret computer code to deny them access to files has been locked out of his office and assigned to other duties, Deputy Mayor Alphonse G. Hill said yesterday.

Hill said that Alvin C. Frost, a senior cash management analyst who last week sent a letter to Mayor Marion Barry calling for the suspension of Hill and three other top financial officers, was removed from his job Friday because he changed the password to the treasurer's office computer and refused to tell his superiors the code.

Frost confirmed yesterday that he had altered the computer code, saying he did so to prevent documents from being destroyed or altered, which he said has happened before. He charged that his transfer was a retaliation for his highly publicized criticisms of District financial managers.

"They seem more concerned about insubordination than charges of criminal negligence and wrongdoing," Frost said.

Frost's superiors took action on Friday, after Frost had called in sick, to change the lock and confiscate Frost's documents. It was the latest episode in an unusual year-long bureaucratic battle revolving around Frost.

A D.C. native and Harvard Business School graduate, Frost has stridently criticized his superiors, who charge him with being a disruptive employe and a political opportunist.

Hill, who is under investigation by a federal grand jury in connection with the awarding of city accounting subcontracts, has called Frost "a nerd and an imbecile." But Hill said Frost's criticisms of him and Frost's accusations of wrongdoing at a 1985 D.C. City Council hearing were unrelated to Friday's disciplinary action.

"He was insubordinate and he had no right to change the master code," Hill said. He said the decision to transfer Frost to a nearby office and lock him out of the treasurer's office was made by D.C. Controller N. Anthony Calhoun and Assistant Treasurer Fred Williams. Neither could be reached for comment.

Frost, who has worked for the city since 1982 and who manages a $300 million cash investment portfolio, drew the ire of his superiors last year with his charges of incompetence and possible fraud in the cash management system.

Frost wrote a 16-page report on problems in his office, and he testified in 1985 that he had been pressured by Williams to approve the investment of $100 million in a New Jersey investment firm, despite Frost's misgivings that the firm was "thinly capitalized" and risky. The firm, Bevill, Bresler & Schulman Inc., later went backrupt.

After his testimony, Frost was summoned to the mayor's office and criticized by Barry for not following "the chain of command," according to Frost.

Although the city ultimately did not lose money on the BB&S investment, Frost's testimony put his superiors in hot water after disclosure that they had used the computer system to backdate a key memorandum on the subject. Assistant treasurer Williams had submitted a memo to the council's Finance and Revenue Committee -- stamped with a December 1984 date -- to justify the city's investment in BB&S. But a "computer audit trail" of the document disclosed it was written in April 1985.

At least three City Council members expressed outrage at the backdating of the memo, but Hill said last week that he never took disciplinary action against Williams because "nobody has proved to me that Fred backdated anything. I haven't seen any proof."

Charges and countercharges in the financial management office relate to the handling of the city's huge cash flow accounts, which at times are as large as $500 million to $600 million. Frost has described the operation as poorly run, with some poorly educated and ill-trained employes and without clear investment policies and procedures. He repeated those charges Jan. 31 in an eight-page letter to Barry, in which he said the operation "is rife with incompetence, mismanagement, negligence, political favoritism, intimidation and indifference."

Frost told the mayor that his administration is perceived to be "at best, incompetent; and, at worst, immoral and corrupt." Frost said he was considering resigning his job and running for mayor himself, or running for another office, or possibly writing a novel or finishing a book of poetry.

Frost said he decided to change the secret manager's computer code because he believed that another employe used the code to obtain a copy of his Jan. 31 letter -- written in the treasurer's computer system -- and to leak it to the Washington Times..

Williams realized Thursday he could not get access to the manager's computer account and asked Frost whether he had changed the access code, Frost said. Frost acknowledged that he had, but refused to restore the original code or tell Williams the new one, according to Hill.

Frost said that late Thursday he had told Williams he had to hurry to a meeting and would tell Williams the new code on Friday. But Frost said he was ill on Friday and called in sick.

A City Council staff member said yesterday that following after Frost's testimony last year, "We thought it was pretty clear that Frost was insulated from retaliation. You would think it would look terribly obvious" if city officials tried to remove him.

But Hill said the transfer, to yet unspecified duties, is not retaliatory.

"He will be given a key to his new office," Hill said. " . . . He has a phone, a desk. He can continue to work. But he is not in there where the computer is."