* Q2 adjusted profit $2.45/shr vs $2.28 estimate * Sales $4.45 billion, in line with Street view * North America sales offset weak international markets * Company reports record margins * Shares up 7.5 percent By Lynn Adler July 31 (Reuters) - U.S. engine maker Cummins Inc reported adjusted quarterly profit that beat Wall Street estimates as sales in North America helped offset weakness in international markets, especially China and Brazil. The company said on Tuesday that gross margins were at record highs in the quarter and forecast improved margins for the full year despite flat revenue, helping drive shares up nearly 8 percent at midday. Cummins executives said the company was cutting costs, including tightening up on travel and looking to freeze hiring in some parts of the company, with uncertain global economic conditions pressuring truck sales in emerging markets. "It's a much more volatile economy than we were looking at in the first quarter of the year and much harder to predict," Chief Executive Tom Linebarger told analysts on a call. However, "our view still is that developing countries will be growing faster than developed countries and investing in infrastructure." Excluding gains from divestitures, Cummins earned $2.45 per share, topping the average Wall Street forecast of $2.28, according to Thomson Reuters I/B/E/S. Revenue declined 4 percent to $4.45 billion, in line with Wall Street estimates. Excluding the effects of divestitures and currency fluctuations, revenue was flat. "Despite lower revenues, Cummins did a good job improving gross margins on price improvement, mix and manufacturing efficiencies," S&P Capital IQ equity analyst Jim Corridore wrote in a note. "We think Cummins is well positioned in the current environment and should see operating leverage when revenue trends improve." Earlier this month, Cummins cut its sales forecast on weaker orders from truck and power generation customers, a stronger dollar and softer-than-expected demand in emerging markets. In the engine segment, sales declined 2 percent. Improved North American truck and construction market demand was offset by lower sales to China construction, Brazilian truck and North American oil and gas markets. Component sales were unchanged. Higher demand in North America and Brazil was offset by lower demand in Europe and China as well as the impact of divestitures completed in 2011. Power generation sales were also unchanged as higher sales in North America offset lower demand in Europe, China and Latin America. Sales in the distribution segment rose 1 percent, with higher parts and service growth in several regions more than offsetting weaker demand in the markets for North American oil and gas and Middle East power generation. "Second-quarter gross margins were at record levels as we continue to drive improvements in productivity and quality," Linebarger said. Cummins said net earnings were $469 million, or $2.47 per share, down from $505 million or $2.60 a share a year earlier. Earnings before interest and taxes (EBIT) were $669 million or 15.0 percent of sales. Cummins expects full-year revenue of $18 billion, with EBIT between 14.25 and 14.75 percent of sales. That suggests full-year earnings anywhere between $9.25 and $10.00 per share, according to ranges given in various Wall Street analyst notes on Tuesday. Shares of Cummins were up 7.5 percent at $97.28 in midday trading.