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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 3 replies
  • 1771 views
  • 1 like
  • 2 in conversation