while trying to export SAS dataset to xml file in specific schema
i used the below code which works fine in case the whole line length less than 200 character
<tag>+<field_name>+</tag> <=200
else only 200 character from Left hand side are written into the output file
please help as this field can be 4000 character and i cannot write it to the xml this way
or if there is a better way to write xml file using dataset which contain two columns
filename outxml '<file-path>'; data _null_; set work.<dataset_name> NOBS=lst; put '<tag>'; if (condition) then put <field_name> '</tag>' ; end; run;
Try: data _null_; file "c:\temp.xml" linesize=32767; ... run;
Or filename outxml 'c:\temp.xml' lrecl=32767;Try: data _null_; file "c:\temp.xml" linesize=32767; ... run;
Or filename outxml 'c:\temp.xml' lrecl=32767;Consider using PROC STREAM.
thanks i see it's a good option in case no condition to output if there is any way to put condition before output it would be better
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.