In a PS file I have XML data as below:
For ex:
(
You mention Rexx and JCL, I am going to presume those are merely suggestions and not requirements.
I suggest you look to the z/OS Unix System Services utilities for your solution. You mention "huge XML" and if "huge" means "more than 32K" then you will likely find yourself writing your single line of XML to a file in the Unix file system rather than a PS dataset.
An awk script, for example, could do what you want.