write pattern + PoS output same line