IBM CEO Virginia E. Rometty
Virginia Rometty became IBM's chief executive on Jan. 1, 2012. Reuters

Banking on software, services and cost controls, International Business Machines Corp. (NYSE: IBM), the No. 2 computer company, is expected to report improved second-quarter earnings despite a decline in revenue.

After Wednesday's market close, analysts surveyed by Reuters expect the Armonk, N.Y., computer services giant to post net income of $3.98 billion, or $3.42 a share, a 3 percent gain, despite a revenue fall around 1.5 percent to $26.3 billion, from the year-ago quarter.

Analysts trimmed their estimates slightly this month in view of the general economic easing, reports of slower growth in key markets like the so-called BRICS countries -- Brazil, Russia, India, China and South Africa -- and the apparent slowdown in PC sales.

In our opinion, IBM has done a tremendous job articulating and executing a differentiated strategy, said Steven Milunovich, analyst with UBS Securities and a veteran industry-watcher. That should mean the company can weather any storm and keep generating earnings from the strategy articulated by its two CEOs since 1993, Louis V. Gerstner Jr. and Samuel Palmisano.

New CEO Virginia Rometty, 54, in charge only since Jan. 1, hasn't deviated, keeping IBM on a steady course, said Milunovich, who rates the shares neutral.

Other analysts agree. Shaw Wu, analyst with Sterne Agee, said IBM is among the best plays in the enterprise space given its lead in analytics. IBM has mushroomed in that sector over the past five years, largely via acquisitions of companies including Cognos Software and SPSS.

Wu rates IBM a buy.

IBM's biggest shareholder -- Warren E. Buffett's Berkshire Hathaway Inc. (NYSE: BRK/A), which acquired a 5.6 percent stake last year -- is likely pleased.

Shares of IBM have risen 5 percent since Buffett bought in. During the quarter, IBM boosted its quarterly dividend 13 percent to 85 cents a share and announced an additional share buyback valued at $7 billion.

IBM shares also set a record high of $210.69 on April 3, before easing recently. They closed Tuesday at $183.65, down $1.14.

IBM derives most of its business outside the U.S., where it's focused activity lately building data centers in India, Brazil, China and Costa Rica and selling computer services under its Smarter Cities umbrella worldwide.

During the quarter, the company also launched a new initiative dubbed IBM PureSystems, an approach that merges all IBM hardware and software product lines for the customer and also operates alongside whatever has been used before.

The goal is to make IBM an easy choice for managers seeking to add services, especially for new cloud applications.

Meanwhile, as IBM appears to be on a steady course, its bigger rival, Hewlett-Packard Co. (NYSE: HPQ) continues to struggle in a tough consumer market for PCs and printers, where it remains No. 1 in both sectors, as well as competing head-to-head vs. IBM in the professional services sector.

Shares of HP, of Palo Alto, Calif., have plunged 46 percent over the past 52 weeks and 27 percent just in 2012.

Under CEO Meg Whitman, its third boss in three years, the company plans to write off $1.2 billion in impairment charges in the current third quarter for the $20 billion acquisition of Compaq Computer Corp., fire as many as 27,000 employees, or 8 percent of the total and slash as much as $3.5 billion in costs.

In some respects, Whitman, 55, appears to be deploying the strategy IBM's Gerstner, now 70, implemented in his first year at IBM in 1993.

Better financial performance apparently pays: HP's market capitalization is now only $37.1 billion, compared with IBM's $211.8 billion.