>I am having difficulty handling the "|" character (line 2) in the >multi-line output. Most compilers us the "^" character. I tried escaping >it i.e. %p\| but that did not work.
I'm not quite sure what you mean by "handling" it, but did you try using "<bar>" instead? Would make it a literal bar instead of, eg, daisychaining commands together, a logical-or, etc.