Baltimore Mayor William Donald Schaefer told the graduating class of the University of Maryland yesterday that his city's nationally recognized renaissance is threatened by a cutoff of federal dollars and lack of a coherent program for the nation's urban areas..

Schaefer received an honorary doctor of laws degree during a two-hour commencement ceremony at College Park and took the opportunity both to tout Baltimore's accomplishments and warn of an uncertain future.

"What we have demonstrated in Baltimore is that cities can do a lot to help themselves," Schaefer said. "What we needed was committed people, and the capital resources supplied by the federal and state and local government. When we had the resources, we produced."

Now, Schaefer said, "budgets are cut as if they were simply lines in a book," and, as a result, "Baltimore City does not have the resources to pick up the slack."

In recognition of its revitalization, the university chose the city as the theme for its 187th commencement exercises for 2,250 recipients of undergraduate and graduate degrees. Also honored were Baltimore Symphony Orchestra music director Sergiu Comissiona, who received an honorary doctor of fine arts degree, and philanthropist-realtor Joseph Meyerhoff.

Baltimore has managed to shed its image as a grimy port city through a combination of public and private money and a generous amount of civic boosterism, led largely by Schaefer, the city's head cheerleader. He has served as mayor since 1971.

"Ten years ago, you went around Baltimore to get to Philadelphia and Washington," Schaefer said. "Now you visit Baltimore first, then go to our suburb -- currently known as Washington, D.C."