Serena Software ( SRNA) was set to pop after the company swung to a first-quarter loss but said operating earnings were about 20% above what analysts had been forecasting. The San Mateo, Calif., enterprise automation software company lost $4.3 million, or 11 cents a share, on revenue of $15.8 million in the quarter ended April 30, 2004, compared with earnings of $5.8 million, or 14 cents a share, on revenue of $10.9 million a year ago. The latest quarter included a $10.4 million pretax charge to write down in-process research related to an acquisition. Excluding various items, the company earned $9.7 million, or 24 cents a share, in the latest quarter. On that basis, analysts had been forecasting earnings of 20 cents a share, according to Thomson First Call. The shares were recently up $1.72, or 10.3%, to $18.50 on the Instinet premarket session. Serena said software licenses revenue was $15.8 million in the most recent quarter, up 46% over last year, while maintenance revenue was $14.8 million and services revenue was $3.1 million. The company also said second-quarter operating earnings will be between $55 million and $58 million, or 24 cents and 25 cents a share, roughly in line with estimates.