The company has been trying to reduce its reliance on the cyclical mainframe business by focusing on its software unit including its high-margin Red Hat business, which helps firms run applications across different cloud providers.