Earnings for Occidental Petroleum (OXY -0.09%) were down ever so slightly as the oil and gas producer's net income slipped 0.5% year over year. That was enough to disappoint investors, which pushed its stock to slip a few percentage points after the release. Let's drill down into the release and see what went on in the quarter.

Drilling down into the numbers
Occidental reported earnings of $1.32 billion, which was slightly down from last year's second-quarter number of $1.33 billion. That translated into earnings per share of $1.64, which was flat from last year because the company's buyback helped to boost its per-share earnings. However, the company reported a gain on the sale of an investment in a Brazilian chemical facility this quarter; without that sale earnings would have just been $1.58 a share, a bit below the $1.60 that analysts were expecting.

Revenue for the quarter was up 3.4% to $5.96 billion, though that too was beneath analyst expectations of $6.18 billion. While the company was able to boost its production by 0.8% in the quarter, lower realized oil and natural gas liquids prices hurt its revenue. The company also was up against higher costs; its income taxes grew by 3% while it took a $34 million after-tax charge for the estimated costs relating to its former executive chairman and the termination of certain other employees. This is in addition to stormy weather in West Texas and insurgent activity in Colombia, both of which hurt its production.

Producing cash
Occidental has been focused on cutting its costs and producing cash flow. So far this year, the company has cut its drilling costs by 21% over last year. This has enabled the company to save some of the money it was planning to spend on capital projects, which helped Occidental to produce $6.4 billion in cash flow this year, nearly doubling its cash balance to $3.1 billion. The following slide shows how the company has been using its cash this year:

Source: Occidental Petroleum Investor Presentation 

Looking ahead
It's quite possible that there are big changes ahead for Occidental. This past quarter's sale of its investment in the Brazilian chemical facility could be just the tip of the iceberg for the company. There has been talk that the company could continue to sell off or spin out many of its other assets, which could unlock tremendous value for investors.

The company has watched peer ConocoPhillips (COP -0.43%) reap the benefits of its refinery spin-off, as Phillips 66 (PSX -0.66%) is up nearly 60% since being set free. Meanwhile, Conoco itself is up over 20% since the spin-off. Investors like these moves because they can set a business free to focus on growth instead of being forced to compete internally for capital. 

Final Foolish thoughts
Overall, it wasn't a bad quarter for Occidental, though the company does appear to be stuck in neutral. However, Occidental could be a big winner depending on what it decides to do with its asset base. Refocusing the business to take advantage of today's high oil prices could provide a big boost to the stock price.