Insert a header at the top of the output XML. This code inserts the header <?xml version="1.0" encoding="ebcdic1047"?> in the output XML file that is identified by the fileref MYOUTPUT. ENCODING= EBCDIC1047 in the FILENAME statement indicates the encoding for Western EBCDIC. For a list of encoding values, see the SAS National Language Support (NLS): Reference Guide.


filename myoutput "u:\out.xml" encoding=ebcdic1047;
proc metadata
     header=full
     out=myoutput
     in="<GetTypes>
         <Types/>
         <Ns>SAS</Ns>
         <Flags/>
         <Options/>
         </GetTypes>";
run;