War is good business for agriculture.

Take the Persian Gulf war. Iraq, a California-sized country of 16 million people has been at war with neighboring Iran for eight years.The religious conflict has so far cost the two Islamic countries more than $200 billion in weaponry, fuel and manpower. But the two are spending increasing sums on imported food.

Iran has banned U.S. food imports since 1982, but they're getting what they need from Canada, Australia and Argentina.

Meanwhile, Iraq has become one of the hottest new markets for U.S.-grown commodities. So hot that soon it may be spending $1 billion or more annually on imports of U.S. food.

That's at least 3 percent of all U.S. agricultural exports, going to just one country with a tiny fraction of 1 percent of the world's population.

When Iran's Ayatollah Khomeini and Iraqi strongman Sadam Hussein began trading blows in 1981, Iraq was flush with oil money. By 1985, the war had drained its cash reserves from $35 billion to about $2 billion, while its foreign debt had swelled to $50 billion.

The war, combined with a couple of bad crop years, led to severe food shortages, especially meat, in both countries.

The war is an expensive, foolish venture and it was long ago time to cut it out, said John Parker, a USDA Middle East expert. But you've got two non- economic people - the ayatollah, a religion man, in Iran, and Sadam Hussein, a military professional in Iraq - running the show.

Neither one seems to perceive the dreadful damage the war has inflicted on their people. The economic atmosphere is dismal, with money in short supply and food shortages threatened at every new turn in this bitter struggle.

USDA came to the rescue with several billion dollars in short- and medium-term credits to Iraq. The United States further sweetened Iraq's taste for American commodities by offering them goods extra cheap through the Export Enhancement Program (EEP). So Iraq gets to borrow cheap U.S. money to buy cheap U.S. commodities. What a deal!

Iraq's war-fueled food demand has been a sweet deal for just about every sector of U.S. farming.

Rice growers are happy because Iraq now imports about 25 million bushels annually, or 20 percent of all U.S. rice exports. That's worth about $125 million, and makes Iraq a gold mine for U.S. rice farmers, who know there's practically a guaranteed market for at least one of every five bushels they export.

The dairy trade gets its cut. USDA has sold Iraq some 6,000 head of dairy cattle, purchased at full price from U.S. farmers under the dairy buy-out program. The cattle were delivered to the Iraqis at less than half the cost and on credit.

The U.S. wheat industry can claim a stake, too.

From less than $20 million in sales in 1982, annual U.S. wheat and wheat flour exports - including a lot of EEP deals - to Iraq are now running at more than a million metric tons, worth $150 million.

U.S. corn exports to Iraq last year totaled 16 million bushels, up 30 percent from the previous year. U.S. barley exports to Iraq have blossomed

from minimal quantities earlier in the decade to more than 11 million subsidized bushels this year.

That's no chicken feed. And speaking of chicken and turkey, the U.S. last year sold 175 million pounds of frozen poultry to Iraq under the export subsidy program, not to mention the millions of U.S. eggs that make it over there under various USDA credit and subsidy deals.

U.S. sugar sales to Iraq are now worth about $30 million annually.

The Iraqi market for U.S. tobacco - another subsidized crop - doubled in 1987, to more than 10 million pounds.

Iraq also has become an important new market for U.S. cotton, and it's turned into one of the biggest new markets for U.S. soymeal.

It looks as if everybody - from missile-makers to wheat farmers - gets a slice of Iraq's war-fueled action.

The Iraqis pay promptly, unlike the Iranians who seem to be having trouble paying their bills. At least, the Iraqis are paying off their U.S. creditors, a good move on their part since they probably have every intention of borrowing from us again to take advantage of America's cheap food policy.

(We haven't ignored Iran, Iraq's sworn enemy. Our contribution to the ayatollah's war effort - besides behind-the-scenes weapon-funding deals - was to buy up to 200,000 barrels a day of Iranian - not Iraqi - crude oil. President Reagan clamped down on that practice after the Iranians blasted away at U.S.-flagged Kuwaiti tankers.)

The morale is bad on both sides, I think, with many people facing the prospect of being killed at the front and being recalled time after time, despite long service out there already, said USDA's Parker.