GRAINS-Corn marches to 3-1/2-week high on China buying, U.S. flood worries

* U.S. flooding stokes fears of corn planting disruption

* Soybeans ease on potential planting shift, trade uncertainty

* Firm dollar, lower broader commodities markets weigh on grains (Rewrites throughout with U.S. market open, adds quote, updates prices, changes byline, dateline, previous PARIS/SYDNEY)

CHICAGO, March 22 (Reuters) - U.S. corn futures rose to a 3-1/2-week high on Friday as China booked its largest purchase of the grain in more than 5 years and as flooding in the western U.S. Midwest raised concerns over spring planting.

Technical selling and profit-taking later pulled corn from the highs, although the market remained on pace for a second straight weekly gain.

Soybeans fell for the first time in three sessions on worries over demand for ample U.S. supplies as Brazilian farmers are harvesting a bumper crop. Wheat futures were higher.

The U.S. Department of Agriculture announced corn sales totaling 300,000 tonnes to China on Friday following weeks of rumors that Beijing was poised to make a goodwill purchase of the grain amid ongoing U.S.-China trade talks.

Gains in grains were limited by a broader commodities market selloff and as a firming U.S. dollar, particularly against the currencies of rival exporters Brazil and Argentina, stoked concerns about U.S. export demand.

Flooding in the western U.S. Midwest remained a focus for grains markets as large swathes of Iowa and Nebraska - two of the top three corn-producing states - are under water.

"We're fading back going into the weekend. There is probably some more upside to this market, but we're seeing some profit-taking today," said Jack Scoville, analyst with the Price Group.

"There are going to be a lot of people looking at planting beans instead of corn if they can with all this flooding," he said.

The USDA is due to release its annual planting prospects report next Friday.

A farmer survey by crop advisory firm Farm Futures on Friday said U.S. growers will plant 1.9 percent more corn acres this year and 3.7 percent less soybeans.

Chicago Board of Trade May corn futures were up 2-3/4 cents at $3.79 a bushel at 12:52 p.m. CDT (1852 GMT). May soybeans were down 6 cents at $9.04-1/2 a bushel, while CBOT May wheat was up 1-3/4 cents at $4.68-1/4 a bushel. (Additional reporting by Gus Trompiz in Paris and Colin Packham in Sydney; editing by David Goodman and James Dalgleish)