Undated (AP) _ Copper futures prices soared nearer to record highs Wednesday on New York's Commodity Exchange on fears that a work stoppage in Peru, the world's sixth largest copper producer, would further reduce already tight supplies of the metal.

On other markets, precious metals were lower; energy futures surged; grains and soybeans were mixed; livestock and meat were mixed and stock-index futures retreated.

Copper for spot delivery settled 3.7 cents higher at $1.417 a pound, just 4.3 cents below the all-time Comex high of $1.46 reached last Dec. 31. Copper for delivery in December settled $1.335, up 5.55 cents.

''There's a very strong chance copper could well take out the $1.50 area on a spot level basis,'' said George Anagnos, metals analyst with Thomson McKinnon Securities Inc. in New York.

Labor problems have already cost Peru a 17 percent decline in copper production through August of this year, Anagnos said. The current miners' walkout, which began on Tuesday, demonstrates that ''the labor situation in Peru and the copper mining situation in Peru is something we can't bank on,'' Anagnos said.

Analysts said overall copper production outside of North America was expected to decline this year. The United States was the world's second- largest copper producer last year, just behind Chile, and Canada ranked third.

Yet demand for the metal has been strong in recent weeks due to seasonal factors and to the strong economies of the major industrialized nations.

The American Bureau of Metal Statistics reported domestic refined copper inventories of 52,500 short tons at the end of August, a seemingly healthy gain from 42,000 short tons in June. But more than half of the increase was due to a buildup in Comex warehouse stocks, which have declined rapidly since August.

Furthermore, the August ABMS figure was more than 35 percent below the Dec. 31, 1987, level and nearly 63 percent lower than that for August 1987.

Precious metals prices finished slightly lower on the Comex.

Gold settled 40 cents lower across the board with December at $414.70 a troy ounce; silver was 1.8 cents to 2.4 cents lower with December at $6.405 a troy ounce.

Oil futures prices soared in hectic trading on the eve of meetings by two OPEC committees that are expected to focus on the cartel's rampant overproduction.

Hopes of an agreement to rein in production sparked frantic buying, analysts said.

West Texas Intermediate crude oil settled 78 cents to 84 cents higher with November at $15.40 a barrel; heating oil was 1.18 cents to 1.64 cents higher with November at 43.85 cents a gallon; unleaded gasoline was 1 cent to 2.14 cents higher with November at 49.06 cents a gallon.

Wheat and soybean futures, bolstered by a spurt in export activity, settled modestly higher on the Chicago Board of Trade while corn and oat futures finished mostly lower.

The Agriculture Department said after the close that Egypt had purchased 250,000 metric tons of U.S. wheat at subsidized prices and the Philippines had purchased 35,000 metric tons of subsidized wheat. Exporters said China had bought 170,000 metric tons of wheat, also at prices subsidized under an Agriculture Department program to boost exports.

Taiwan was said to have purchased 27,000 metric tons of U.S. soybeans at market prices and was expected to bid for another 54,000 metric tons Wednesday night.

Wheat settled 2 3/4 cents to 4 cents higher with December at $4.26 a bushel; corn was unchanged to 1 1/2 cents lower with December at $2.90 3/4 a bushel; oats were 2 cents lower to 3/4 cent higher with December at $2.58 1/ 4 a bushel; soybeans were 1 cent to 6 cents higher with November at $8.06 1/2 a bushel.

Cattle futures ended higher on the Chicago Mercantile Exchange ahead of Friday's quarterly USDA cattle-on-feed report from the Agriculture Department. The report is expected to show a reduction in the number of cattle being fattened for slaughter due to record-high marketings and significantly fewer placements.

Pork futures were mostly lower in line with weaker cash markets.

Live cattle settled .05 cent to .30 cent higher with October at 72.32 cents a pound; feeder cattle were .10 cent to .40 cent higher with October at 81.90 cents a pound; live hogs were .33 cent lower to .18 cent higher with October at 39.57 cents a pound; frozen pork bellies were .13 cent to .82 cent lower with February at 48.37 cents a pound.

Stock-index futures settled moderately lower on the Chicago Merc, where the contract for December delivery of the Standard & Poor's 500 index finished 2.40 points lower at 278.80.