10-05-2017 08:59 AM
I'm using SAS 9.4.
I tried to create XML file from SAS table WORK.myInFile with has 220 columns.
Source table myInFile has columns ID, Name, Surname, Address, Age ... and many more, up to 220.
XML file should have 5 columns: ID Name Surname Address Age.
libname myXOut XML92 '/home/harry/xmlout.xml'; data myXOut.xmlout(keep=ID Name Surname Address Age); set myInFile; /* 220 columns */ run;
After run I have error:
ERROR: An exception has been encountered. Please contact technical support and provide them with the folowing traceback information: The SAS task name is [DATASTEP] Segmentation Violation Traceback of the Exception: /sas/bin/SASFoundation/9.4/sasexe/sas() [0x52815e] /sas/bin/SASFoundation/9.4/sasexe/sas() [0x41f0ee] /sas/bin/SASFoundation/9.4/sasexe/tkmk.so(bkt_signal_handler+0x144) [0x7f2b4ab745d4] /lib64/libpthread.so.0() [0x30dc60f7e0] /sas/bin/SASFoundation/9.4/sasexe/sasyoio(yvpute+0x7ea) [0x7f2b01a19aba] /sas/bin/SASFoundation/9.4/sasexe/sasdsx(dsdiout+0x902) [0x7f2af82a2382] /sas/bin/SASFoundation/9.4/sasexe/sasdsx(dsxxini+0x94) [0x7f2af8299884] /sas/bin/SASFoundation/9.4/sasexe/sasds(dsexec+0x31) [0x7f2af96b2cd1] /sas/bin/SASFoundation/9.4/sasexe/sasds(sasds+0x26ef) [0x7f2af96b181f] /sas/bin/SASFoundation/9.4/sasexe/sas(vvtentr+0x101) [0x41ed01] /lib64/libpthread.so.0() [0x30dc607aa1] /lib64/libc.so.6(clone+0x6d) [0x30dc2e8bcd]
I made a lot of tests with shorter source table, less number of records, no success.
But when some of columns had been removed, export to XML ended with success.
I noticed that for 192 columns the error did'nt occur and it does'nt matter what widths are variable/columns.
For 193 columns and more errors already occur.
Can someone confirm that there is an export limitation to 192 columns for the XML92 engine ?
In the SAS 9.4 documentation I can not find such proof.
10-05-2017 10:36 AM
Did you try xmlv2 engine ?
libname myXOut XMLv2 'c:\temp\xmlout.xml'; data myXOut.xmlout(keep= Name sex Age); set sashelp.class; /* 220 columns */ run;
10-11-2017 12:43 PM
10-11-2017 01:04 PM - edited 10-11-2017 01:07 PM
Why are you asking SAS to generate 220 columns if you only want 5 of them?
Does it change anything to move the KEEP= dataset option to the input dataset.
data myXOut.xmlout; set myInFile(keep=ID Name Surname Address Age); run;
Or even to just use a normal KEEP statement?
data myXOut.xmlout; set myInFile; keep ID Name Surname Address Age; run;
Are you sure it is not related the values of variables? What happens if you reduce the number of observations?
data myXOut.xmlout; set myInFile(obs=10 keep=ID Name Surname Address Age); run;