Ratification of a new labor contract by the rank-and-file of the United Mine Workers is expected within a week now that the union has won most of its demands from the coal companies, sources said.

UNW and the the Bituminous Coal Operations Association, which represents the major coal operations, said Tuesday that they have agreed on a new contract to end the trouble-marked, seven-month strike by about 18,000 miners in seven states.Officials refused to discuss the settlement's details until UMW members vote on it, but reliable sources said the union goals, including job security, were largely met.

Suffering steady membership losses from mine closings and the shift to non-union mines, the UMW walked out last May to force the operators to guarantee more jobs at new mines to union members.

"You can be sure the job security issues were dealt with in the contract," said Tom Hoffman, a spokesman for the BCOA.

U.S. Labor Secretary Robert Reich said that the contract "achieved an important measure of job security" for union members.

Mr. Reich also said that part of the agreement calls for an industry-wide labor-management committee designed to resolve problems long before a contract expires.

The union quickly turned the strike into a battle not over wages or conditions, but the UMW's survival.

From 400,000 members in the 1940s, the UMW's ranks have plummeted to about 65,000. The union's miners now account for only about 38 percent of the coal mined in the nation.

The union complained that the owners had broken previous agreements by opening new mines under non-union conditions and not hiring their members. The companies insisted they could not afford to be forced to hire strictly from among the UMW's ranks at their new mines.