For the first time in two decades, the General Services Administration will buy a building rather than build or lease it.

The building, at 555 Griffin Square in Dallas, will be purchased under a new federal program designed to "help the government make a good deal, when one comes along," according to Richard O. Haase, GSA's commissioner of public buildings.

In fiscal 1983, GSA has $14 million that it can spend under this program, and the Dallas building will go for about $7.2 million. In fiscal 1984, GSA is asking for $20 million for the program.

General Services Administrator Gerald P. Carmen gave the Griffin Square buy his approval on Tuesday. Charles Sampson, who heads GSA's public buildings management review division, said the agency hopes to settle with the building's owners--the John Hancock Mutual Life Insurance Co.--by Feb. 28.

The Labor Department's regional office now occupies 128,000 square feet of the government's 134,000 square feet of space in the Griffin Square building. The remainder is occupied by the Justice Department parole board. About 26,000 square feet of space is commercially rented and GSA will allow those occupants to remain until their leases expire. Then the government will try to move federal agencies in the Dallas-Fort Worth area out of leased space and into the Griffin Square building until it's filled. The government now employs 655 people there.

"What we're trying to do is find buildings that are occupied by federal agencies where the builder wants to sell it to us and it's a good deal," Sampson said. The Griffin Square building is 11 years old, meets government standards and needs only minimal work to bring it up to GSA's fire safety standards, according to Deputy GSA Administrator Ray Kline.

Currently, the federal government occupies 6.4 million square feet of office space in Dallas-Fort Worth, and 76 percent of it is government owned.