President Reagan was absolutely right to veto the bill to protect the textile industry from foreign competition. And he did it for the right reason -- because the costs to this country would have been all out of proportion to the number of jobs saved. But, with the textile bill dead, what comes next?

Congress is certainly going to take up further trade legislation next year, and there's been an interesting progression in congressional opinions over the past six or eight months. When the textile bill was gathering momentum last spring, it looked unstoppable. At one point two-thirds of the House and over half the Senate had signed on as cosponsors. Language to protect the shoe and copper industries was tacked on to broaden its appeal even more. But then congressmen began to hear from the businesses that would have been hurt by the bill, and to realize that it would have saved jobs in the favored industries only at the price of other jobs eliminated elsewhere. They eventually passed the bill, but support has fallen and the veto is unlikely to be overridden.

And yet, if protectionist legislation isn't the answer to the past three years' surge of imports, what is? There's a rising impatience with other countries' trade practices that congressmen consider unfair -- and sometimes with good reason. Sen. Robert Dole, the majority leader, delivered a sharp denunciation yesterday of Japan's record. But most of Congress has also become aware that the dollar's exchange rate is a far more powerful cause of the trade deficit than Japan's barriers to foreign goods. Getting a handle on the exchange rate is not a simple matter. It depends broadly on the state of this country's economy compared with those of the countries with which Americans trade.

It looks as though Congress is going to work next year on omnibus legislation taking up the whole range of trade issues, from the specific quarrels with the Japanese to basic economic policy. In the Senate the starting point is clearly going to be the bipartisan bill introduced last month -- a highly promising beginning. It doesn't try to bail out specific industries with gimmicks that would hurt other American industries. Instead, it is directed to the basic rules of foreign trade. One notable section goes directly to the source of the exchange rate distortions by mandating closer coordination of economic policy with this country's trading partners. That would be an important contribution to stability, not only abroad but here as well.

The president's veto has prevented a bad bill from becoming law. The sponsors of the bipartisan bill have meanwhile put the Senate on the track toward legislation that is more realistic and more likely to contribute to American prosperity.