THE MEXICAN GAS negotiations are, at the moment, hanging in midair. That's a bad place for them. President Carter is going to Mexico City next month, and agreement on the gas is now urgently in the interest of both countries. It's not only that the amounts of gas for sale are enormous. Mexico's future policy on oil production will be influenced by its ability to dispose of the gas. The turmoil in Iran, and the abrupt cessation of its oil exports, suggests once again the peril in the Unites States' present over-dependence on Middle Eastern supplies. Anything that encourages new oil and gas production anywhere else in the world is good for the United States. That's why the Carter administration needs to get the gas talks going again -- rapidly.

These gas negotiations have an unforunate history. The pipeline to carry the gas from the wells up to the U.S. border is already under construction. Last year Pemex, the Mexican oil and gas monopoly, had arrived at an agreement with a consortium of six American gas transmission companies. But then the U.S. government suddenly intervened and suspended the whole sale. The reasons are still not entirely clear, but the American buyers were offering a price significantly higher than the regulated ceiling price for domestic gas. Perhaps the administration feared that approval of that higher price might upset the fragile compromise in Congress on the gas-pricing bill that was then inching its way, excruciatingly slowly, toward enactment.

This abrupt and unexplained veto by the Carter administration has deeply irritated the Mexicans. It suggests a lack of concern for the Mexican position when it might conflict with the political exigencies of the moment here. To the Mexicans, the whole affair seemed to cast doubt on the reliability and constancy of American purposes.

The issue is essentially the price. The Mexicans wanted to sell the gas for the price that Americans would pay for the equivalent energy in imported heating oil. The Carter administration has two objections to that. First, it is understandably reluctant to let the price of other fuels get tied automatically to a standard -- the price of imported oil -- that OPEC can raise at will. Second, it argues that this gas will not compete with heating oil but rather with the grades of heavy industrial fuel oil tht are considerably cheaper. Both of these objections are reasonable. But the first one, involving the like to world oil prices, has already been eroded a bit. Both belong to the category of issues that reasonable people ought to be able to work out amicably. It would probably serve this country best to give little on the initial price, in order to get more assurance of predictability for the future.

But there are compelling reasons on both sides of the border to get an agreement. The Mexican gas is produced in association with the oil -- which is to say that they come up the pipe mixed together. At present the gas is being flared off in the Mexican fields merely to get rid of it. Those flares are a dismaying symbol of waste. If the Mexican government cannot sell its gas in the American market, it may well feel a responsibility to hold down the development of both oil and gas production until its own economy can absorb the gas. Mexico can sell her oil anywhere. But for the gas there is, as a practical matter, only one possible market of any great significance.

The Mexican gas negotiations constitute a test of the Carter administration's attitudes toward Mexico's resources generally, and the relationship that this country would like to strike with the owners. Mexico is a peaceful and stable country. Peace, stability and proximity of the producing country ought to be worth quite a lot to the customer. That, unhappily, is the lesson of Iran.