John J. Stocker has mixed feelings over Pepsico's agreement with the Soviet Union to barter soft drinks for vodka and ships.

"I think it's a fascinating deal in terms of the globalization of American business," he said, but as president of the Shipbuilders Council of America he is uneasy."We're watching the situation with great concern," he said. "Will Pepsi be underwriting attempts by the Soviets to get into the world market to the detriment of American shipbuilders?"

As part of the $3 billion agreement announced in Moscow on Monday, Soviet shipyards will build at least 10 commercial vessels for Pepsi that will then be sold or leased in the international markets.

A spokesman for the Purchase, N.Y., soft drink maker and fast-food marketer said the ships will range in size from 28,600 to 65,000 tons. The value of the ships will exceed $300 million.

An unidentified Norwegian broker will handle the sales or leasing of the ships, the spokesman said. "We're not in the business of selling ships so we will work through a middleperson."

He said he could not specify the types of ships, their delivery dates or whether the ship-size figures deadweight tons or gross tons.

Mr. Stocker said he is concerned that the Soviets and their former East European satellites will end up dumping ships on the world market as a way of generating both employment for their people and desperately needed hard currency as they make the transition to market economies.

Acting on a petition from the Shipbuilders Council, the U.S. Trade Representative's Office last year filed complaints under the Super 301 provision in the 1988 trade law. The office charged West Germany, Norway, Japan and South Korea with providing unfair subsidies to their shipbuilding industries.

The American shipbuilding industry for years has been unable to compete effectively for commercial orders and therefore has had to rely on the Navy for most of its work.

Now, as the Navy faces cutbacks in its budget, the shipbuilders are hoping they can regain some of the commercial work they have lost over the years to foreign yards. Mr. Stocker expects the Soviets also will be seeking to build more merchant vessels in place of Soviet Navy ships.

''I don't know whether anyone in the bureaucracy has thought about the implications of a deal such as Pepsi's on a resource like the American shipbuilding industry," he said.

Under the agreement, Pepsi-Cola sales in the Soviet Union will more than double through a massive expansion and upgrading of its production and distribution system there, the company said. The number of Pepsi plants will rise from the current 24 to 50.

Most of the funding for the new plants will be covered by proceeds from the sale of Russian vodka in the U.S. market.

Foreign exchange credits generated from the sales and lease of the ships will also be partly used for initial investments in two Pizza Hut restaurants slated to open in Moscow this year. Pizza Hut is a Pepsico subsidiary.

Experts on Soviet trade hailed the agreement.

"I think the Pepsico deal is a very creative approach to the development of trade with the Soviet Union," said William D. Forrester, president of the New York-based U.S.-U.S.S.R. Trade and Economic Council. "I hope it serves as a model for similar ventures in the near future."

"It's a win-win situation," said Elizabeth A. Ezrine, manager-U.S.S.R., for Creditanstalt-AWT Trade Services Co. in New York. "This is a good example. As other Western companies see that it's possible to put together the mechanics of a deal, that will make them more open to the idea of doing business with the Soviet Union and to the idea of looking for something less traditional."

Joseph Tragert, an economist with PlanEcon Inc., a Washington-based consulting firm, said he expects the Soviets to seek more such agreements.

"As the pressure to modernize within the Soviet Union becomes greater and greater, and there's more decentralization, we'll see more of these big deals," he said.

Not everyone was so euphoric about the Pepsi deal. Noting the vagaries of the shippingindustry, one American shipping executive commented, "If I were Pepsi, I'd be nervous about taking my profit out in ships."

While none of the trade experts professed to have any expertise in shipbuilding, all expressed confidence that the Soviets could retool their shipyards to build merchant vessels.

"It can be done," said Mr. Tragert, although it's questionable whether Soviet-built merchant ships would have the same quality as Soviet Navy vessels.

"I think that in the merchant ship area they can move over more easily than a tank factory moving over to build tractors," he said.

Ms. Ezrine noted that Sudoexport, one of Pepsi's partners in the deal, has been building ships for foreign customers for years.

The Soviets also buy ships from abroad. Mr. Tragert noted that they have bought many ships from the Gdansk shipyard in Poland, where Solidarity, the Polish trade union led by Lech Walesa, got its start.