ST. LOUIS, JUNE 20 -- The slump in the defense industry hit the Pentagon's two biggest contractors again today, with McDonnell Douglas Corp. announcing plans for major layoffs and General Dynamics Corp. getting its credit rating cut.

McDonnell Douglas, the nation's biggest defense contractor, announced plans to eliminate at least $700 million a year from its cost structure, including laying off a ''substantial'' number of its 127,000 workers worldwide.

John F. McDonnell, chairman and chief executive, said the cost-cutting plan should be in place by early August, with immediate steps being taken on overtime, travel, new hiring, consultants, advertising and support activities.

Officials declined to reveal the number of planned layoffs, which will be made within the next few months. St. Louis television stations quoted unnamed company sources as saying the cuts could be up to 10 percent of McDonnell Douglas' work force.

Also today, Moody's Investor Services Inc. dropped its credit ratings two notches for General Dynamics, nation's second-biggest defense contractor.

Both companies are headquartered in St. Louis.

Moody's dropped General Dynamics's senior bonds from A2 to Baa1 and the company's subordinated debt from A3 to Baa2 because of the sagging conditions in the defense industry.

The ratings put the company's bonds into the bottom category of investment grade issues.

Moody's said it ''believes that the manufacturers of defense platforms {planes, tanks, submarines} will be the most severely affected by reduced defense spending.'' Fred Pastore, associate director of the High Technology Group at Moody's, said another reason for the credit rating downgrade was the company's decreased amount of readily available cash.