A D.C. Superior Court judge has upheld a controversial tax on professionals who work in the city.

In an opinion released yesterday, Judge John Garrett Penn dismissed a sult brought in behalf of suburban residents with offices in Washington who claimed the tax was enacted illegally and that it discriminated against them because they did not live in the city.

While Penn's ruling settles several disputes at the lower-court level over the tax, the final resolution of the arugment is expected to take place in the D.C. Court of Appeals.

Lawyers for Richard A. Bishop and Axel Felix Kleibeemer, who brought the suit, said they would file appeals today.

Bishop, who lives in Virginia, and Kleiboemer, who lives in Maryland, are both lawyers with practices in Washington, Kleiboemer's petition to the Court was treated as a class action suit in behalf of all nonresidents who have paid the 9 per cent tax, imposed in 1975.

At that time, the city Council made what is called an "unincorporated business franchise tax" applicable to people like doctors, lawyers, architects and enginers.

Opponents who are not residents of the District claimed tht the tax was a levy on their personal income. Such a tax they said, was prohibited by Congress when it granted the District home rule.

In his opinion, Penn concluded that tax discriminated against nonresidnts because it allowed District residents to deduct the professional tax from their D.C. income tax payment.

In his opinion, Penn concluded that Congress provided for the imposition of a tax "for the privilege of carrying on or engaging in any trade or business and of receiving income from sources in the District,"

Just because the professional tax is based on taxable income "it makes it no less a franchise tax." Penn said.

Penn siad the fact that District residents can deduct the tax from personal income-tax payments to the city does not make the professional tax unconstitutional in terms of the arguments made by the two lawyers who brough the suit.

Here the tax is imposed equally on both resident and the nonresident alike, and both are entitled to the same exemptions and deductions" allowable under the professional tax guidelines, Penn said.

Penn found that the tax treated residents and nonresidents alike. He also concluded that the lawyers and other professionals had received adequate notice that such a tax was being considered by the city government.

Assistant corporation counsel Richard L. Aguglia, who argued the case for the city, said the District of Columbia has collected a total of $25 million since the professional tax went into effect close to three years ago.

The suit asked that the Court declare the tax illegal and to refund the taxes the lawyers and other professionals had paid.