DATA Step, Macro, Functions and more

Export dataset to XML Segment violation error

Reply
New Contributor
Posts: 2

Export dataset to XML Segment violation error

Hi all,

 

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.


My code:

 

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.

 

Thanks.

SAS Super FREQ
Posts: 8,868

Re: Export dataset to XML Segment violation error

Posted in reply to HarryCezary
Hi:
As it explains in the log, you need to report this to Tech Support. They can answer any additional questions you have.

cynthia
Super User
Posts: 10,035

Re: Export dataset to XML Segment violation error

Posted in reply to HarryCezary

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;
New Contributor
Posts: 2

Re: Export dataset to XML Segment violation error

Posted in reply to HarryCezary

Hi,

 

Thank you for the quick response.

Yes, I tried.

Unfortunately, I do not have a luck, without success.

I'm still looking for a reason.

SAS Super FREQ
Posts: 8,868

Re: Export dataset to XML Segment violation error

Posted in reply to HarryCezary
Hi:
I really recommend that you refer your code and a sample of your data and your error message to Tech Support. If this is a defect, they may know of a hot fix and if this is an unusual combination of factors that causes an error, then Tech Support can open a defect with the developers. The original message in the log advised you to contact Tech Support and there is a reason they put messages like that in the log. Something happens that needs to be reported. You have the code, the data and know the specifics about the operating system and version in which this occurred -- so you are the best person to report this and open a track with Tech Support. If there is a reason, they will be able to tell you.

Cynthia
Super User
Super User
Posts: 7,060

Re: Export dataset to XML Segment violation error

[ Edited ]
Posted in reply to HarryCezary

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;
Ask a Question
Discussion stats
  • 5 replies
  • 86 views
  • 0 likes
  • 4 in conversation