USX Corp. reported a $14 million profit for the second quarter yesterday, but a $42 million second-quarter loss in its steel operations, which are threatened by a steel workers' strike at midnight Thursday.

Meanwhile, Armco Inc. reported a large second-quarter loss, oil companies Chevron Corp. and Sun Co. reported lower earnings, while Borden Inc., Compaq Computer Corp. and Ramada Inc. listed higher earnings.

USX, formerly U.S. Steel Corp., said its second-quarter profit represented the negative equivalent of 3 cents a common share after payment of $86 million in preferred dividends from prior retained earnings, and came on sales of $4.2 billion. In the same period of 1985, the Pittsburgh company posted a second-quarter profit of $180 million (61 cents a share) on sales of $5.4 billion.

For the first half, USX reported a $235 million loss on sales of $8.8 billion, down from a $365 million profit ($1.24) on sales of $10.4 billion during the 1985 period.Armco Inc., a diversified firm whose holdings include steel, oil equipment and financial services, reported a widened second-quarter loss after taking special charges for reorganization, including the consolidation of its oilfield equipment segment in response to declining oil prices.

The company said it lost $384.7 million on sales of $658.7 million, compared with a loss of $25.7 million and sales of $784.8 million in the same period a year ago.

During the first half of this year, Armco had a net loss of $447.6 million on sales of $1.34 billion, compared with a loss of $52 million on sales of $1.54 billion in the six-month period in 1985. Chevron Corp. of San Francisco reported a 38 percent drop in its second-quarter earnings to $216 million (63 cents a share), down from $347 million ($1.02) in the same period last year. Revenue fell to $6.8 billion in the quarter from $11.7 billion last year.

George M. Keller, board chairman, said earnings were reduced by the decline in crude oil prices and by the company's plan to cut its work force by 15 percent to 52,000 by year-end.

First-half earnings were $593 million ($1.73 a share) down 15 percent from the $701 million ($2.05) earned in the first six months of 1985. Sun Co. reported second-quarter net income was $100 million (92 cents a share) on revenue of $2.48 billion. That compared with earnings in the year-ago period of $146 million ($1.30) on $3.86 billion in revenue.

For the first six months, net income for the Radnor, Pa., company was $246 million ($2.26) on revenue of $5.83 billion. That compared with earnings of $273 million ($2.42) on $7.35 billion in revenue in the same period last year. Borden Inc. reported record second-quarter earnings of $52 million (70 cents a share), up 12 percent compared with $46.3 million (59 cents) in the year-ago quarter.

Sales for the quarter were $1.24 billion, an increase of 4 percent from $1.19 billion a year earlier for the New York firm.

For the first six months, earnings totaled a record $88.6 million ($1.18 a share), up 10 percent compared with $80.9 million ($1.03) in the same period of 1985. Sales in the first half increased 4 percent to $2.37 billion from $2.27 billion.

Eugene J. Sullivan, Borden's chairman and chief executive officer, said that second-quarter operating income, at $119.1 million, was the highest for any quarter, and up from $100 million in the 1985 period. Compaq Computer Corp. of Houston, a fast-growing maker of IBM-compatible personal computers, said its profit rose 70 percent and its sales climbed 24 percent in the second quarter.

Compaq's earnings in the quarter of $9.6 million (34 cents a share) contrasted with $5.7 million (21 cents) in net income for the same period in 1985. Sales rose to $147.1 million from $118.2 million.

For the first half, Compaq's earnings rose 74 percent to $18 million from $10.3 million, while sales rose 35 percent to $291.1 million from $215.9 million. Ramada Inc. of Phoenix reported that net income for the second quarter was $3.7 million (10 cents a share) compared with $3.2 million (8 cents) for the same period in 1985. For the six months ended July 3, Ramada's net income was $1.6 million (4 cents) on revenue of $314.9 million. That compared with net income of $1.9 million (5 cents) on revenue of $287 million in the first half of 1985.