Going back to your original statement, I tried this code:
01 xml-data-input.
05 zipcode PIC x(05) value '30002'.
05 carrrte PIC X(04) value 'r033'.
05 walkseq pic x(05) value '00001'.
05 addr pic x(72) value
'123 main st'.
05 city pic x(20) value 'anytown'.
05 state pic x(02) value 'ga'.
05 zip4 pic x(04) value '0101'.
01 xml-data-output pic x(242) value spaces.
/
PROCEDURE DIVISION.
S1000-MAIN SECTION.
XML GENERATE xml-data-output
from xml-data-input
END-XML.
DISPLAY 'OUTPUT: %' xml-data-output '%'.
GOBACK.
and got these results:
OUTPUT: %<_xml-data-input><zipcode>30002</zipcode><carrrte>r033</carrrte><walkseq><addr>123 main st</addr
><city>anytown</city><state>ga</state><zip4>0101</zip4></_xml-data-input>
%
Perhaps the problem is simply that your main program has upper case variable names while the copy book does not? NOTE: there is NO line break in the actual output line; the forum software is breaking the line.