Dollar struggles for direction, yen rises after data