BookmarkSubscribeRSS Feed
Babloo
Rhodochrosite | Level 12

I'm trying to convert the SAS dataset to XML, but I end up with error as mentioned below. Could you please help me understand the cause for this issue?

libname dds xml "/TST/wrk1/dynamic_pricing.xml";

data dds.dynamic_pricing;
set WORK.DPF_OUTPUTSAS_EXAMPLE1_0001;
run;
Error.png

  Error.png

3 REPLIES 3
Babloo
Rhodochrosite | Level 12

XML file doesn't exist before.

Kurt_Bremser
Super User

I see. When running this code:

libname out xml '$HOME/sascommunity/class.xml';

data out.class;
set sashelp.class;
run;

I get the same message, but the log

24         libname out xml '$HOME/sascommunity/class.xml';
NOTE: Libref OUT was successfully assigned as follows: 
      Engine:        XML 
      Physical Name: $HOME/sascommunity/class.xml
25         
26         data out.class;
27         set sashelp.class;
28         run;

NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: The data set OUT.CLASS has 19 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.13 seconds
      cpu time            0.02 seconds

clearly shows that the step worked. But EG can't display the resulting dataset, which seems to be a consequence of the internal SQL code that EG uses to retrieve data.

OTOH, doing

proc sql;
select * from out.class;
quit;

worked fine.

 

Edit:

But

proc sql;
select name, height from out.class;
quit;

produced totally wrong output, while not showing any problem in the log:

NAME       HEIGHT
-----------------
ÿÿþ             0
ÿÿþ             0
ÿÿþ             0
ÿÿþ             0
ÿÿþ             0
ÿÿþ             0
ÿÿþ             0
ÿÿþ             0
ÿÿþ             0
ÿÿþ             0
ÿÿþ             0
ÿÿþ             0
ÿÿþ             0
ÿÿþ             0
ÿÿþ             0
ÿÿþ             0
ÿÿþ             0
ÿÿþ             0
ÿÿþ             0

So it seems that SAS (at least with proc sql) has some serious problems working with that engine. Open a track with SAS TS.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 2312 views
  • 1 like
  • 2 in conversation