NEW YORK, JULY 19 -- The Dow Jones industrial average today overcame its concern about stagnant interest rates and declining profits, erasing a 23-point midday loss to close up by 12 points.

Computerized trading related to the futures market and a late surge in oil stocks helped prop up the blue-chip average. The oils moved after reports that the Alaska oil pipeline may have to restrict capacity due to environmental concerns.

But broader blue-chip indexes lagged the Dow in its breakneck afternoon rebound. Secondary measures finished with moderate losses, which reflected the dampened trading sentiment resulting from a number of earnings-related price disasters, traders said.

Prominent among stocks falling on disappointing earnings reports today or Wednesday -- or simply on anticipation of them -- were Tandem Computer, BankAmerica, U.S. Shoe, Lotus Development, Apple Computer and San Diego-based thrift holding company HomeFed Corp.

Severe damage to several of the high-technology companies raised questions about whether that sector could continue to lead the market above the 3000 mark. And a price massacre in shares of HomeFed spilled over even to California's money-center banks amid resurgent fears of a collapse in the once high-flying California real-estate market.

At the close, the Dow stood at 2993.81, up 12.13, while declining issues outpaced advancing ones on the Big Board by about 4 to 3 on moderate volume of 161 million shares.

The Dow's oil components performed more than their share of the work of lifting the index in late trading. Chevron rose 1 1/2 to 76 3/4, Du Pont gained 1 to 40 3/4, Texaco added 1 3/4 to 61 1/2 and Exxon tacked on 1 1/2 to 50.

Also prominently down after earnings reports were Primerica, off 1 5/8 at 34 5/8; Apple Computer, down 2 7/8 at 41 3/4; Ashton-Tate, down 7/8 at 9 1/2 in response to earnings late Wednesday; Lotus Development, down 6 1/8 points to 25 1/8 -- a 19 percent free fall following Wednesday's disappointing earnings report and subsequent 2 7/8 loss; Phelps-Dodge, down 1 3/8 at 66; and Colgate-Palmolive, down 1 3/8 at 71 7/8.

The market was uneasy about new losses in some of the financial stocks, traders said.

HomeFed tumbled 4 3/4 to close at 14 1/4 following a 2 1/2-hour delay in trading. The thrift holding company suffered a quarterly loss as a result of a $234 million increase in loan-loss reserves. The Dow transports eked out a 1.10 gain at 1172.63 but the utilities rested unchanged at 203.54, after briefly breaking the closing lows posted in late April.

Among broad stock indexes, the Standard & Poor's 500 was up 1.10 at 365.32, the NYSE Composite up 0.55 at 199.38, the Value Line up 1.00 at 286.51, the Amex Market Value down 0.22 at 361.84 and the Nasdaq Composite down 2.65 at 458.17.