BookmarkSubscribeRSS Feed
HarryCezary
Calcite | Level 5

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.

5 REPLIES 5
Cynthia_sas
SAS Super FREQ
Hi:
As it explains in the log, you need to report this to Tech Support. They can answer any additional questions you have.

cynthia
Ksharp
Super User

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;
HarryCezary
Calcite | Level 5

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.

Cynthia_sas
SAS Super FREQ
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
Tom
Super User Tom
Super User

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;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 853 views
  • 0 likes
  • 4 in conversation