Trans World Airlines Inc. and Ozark Airlines Inc., the two dominant carriers in St. Louis, are on the verge of a merger, Wall Street sources said yesterday.

While emphasizing that a final agreement has not been signed, sources said a plan calling for TWA to acquire Ozark could be announced today or Friday.

But Shearson Lehman Bros. analyst Robert Joedicke cautioned that the two airlines have held serious discussions previously that did not result in a merger.

"Just because you dance with a girl doesn't mean you will marry her," Joedicke said.

"I presume they have been talking," he said. "There is a certain logical fit that would make sense, since the key under airline deregulation is control of traffic feed."

The passenger feed in this case would be Ozark flights feeding domestic and international TWA flights out of St. Louis.

That would be consistent with the trend in the rapidly changing airline industry toward alliances between giant airlines and smaller carriers that can feed passengers.

Also consistent with that trend, TWA yesterday announced that it has entered into an eight-year marketing agreement with Piedmont Airlines.

Beginning May 1, Piedmont will feed passengers to TWA's European and Middle Eastern routes by offering flights that connect with TWA at New York's JFK International Airport.

The Piedmont cities that will be involved initially include Baltimore; Syracuse, N.Y.; Dayton, Ohio, and Charlotte, N.C.

TWA Chairman Carl Icahn, who recently purchased control of the airline, said that, after the summer, additional Piedmont cities will be linked to TWA cities through coordinating schedules.

He also said the airlines will link their mileage-bonus programs for frequent fliers, adding that Piedmont will have six ticket-counter positions and four gates at TWA's JFK Terminal for the convenience of travelers.

The report that TWA is close to an agreement to acquire Ozark for more than $250 million is striking, because TWA is struggling financially.

However, while the company has been losing money on an operating basis, it soon will have in excess of $750 million in cash that Icahn originally was raising so that he could buy out all the public shareholders.

After Icahn acquired control of TWA, he announced a plan to retain the cash.

Icahn said the cash was needed to give the troubled airline some financial security while it continued to experience losses from operations.

He also has said the cash could be used to make acquisitions amid the wave of consolidation taking place in the industry.

The last three days have been unusually active for new alliances in the airline industry.

In addition to the TWA-Piedmont agreement and rumors of a TWA-Ozark combination, Texas Air Corp. agreed to acquire Eastern Airlines for about $700 million, and People Express Airlines yesterday completed the acquisition of Britt Airways, a commuter airline based in Terre Haute, Ind. Britt will feed passengers into People's system from 26 midwestern cities.

People also recently agreed to acquire Denver-based Frontier Airlines and Provincetown-Boston Airline.