BookmarkSubscribeRSS Feed
BharathBandi
Calcite | Level 5

Hi All,

 

I'm trying to import XML file into EG using Assign Library function but couldn't as I couldn't find how to use the file name statement in EG. 

I tried using below code and its working fine but need to convert it into EG tasks.

 

filename Ref "path";
filename SXLEMAP 'path';- created by XML Mapper
libname ref xmlv2 xmlmap=SXLEMAP access=READONLY;  

 

Your help will be really appreciated. Thnaks in advance.

9 REPLIES 9
jklaverstijn
Rhodochrosite | Level 12

What have you tried sofar and what happened. Can you provide logs?

 

If your code works outside of EG you could paste it as-is into a program node inside EG and run it from there.

 

Keep in mind: depending on your EG configuration your code inside EG may run on a different server and the files may not exist on that machine. Copy them over if that's the case. Work with your IT staff/SAS support people if needed.

 

Hope this helps,

- Jan.

BharathBandi
Calcite | Level 5

Thanks for your response.

 

The code is working fine in SAS EG but I have to assign library and read the files(Requirement).

I have assigned a library with XML V2 engine and trying to read the file but I could nt read because of the attached Error. 

thanks

 

jklaverstijn
Rhodochrosite | Level 12

Hi,

 

You have to be more precise in explaining what you do when trying to read the datasets. The XML engine is sequential by nature and does not allow for navigating through the rows. So the EG tale viewer may not work. Whatever youdo, keep in mind that the engine may throw up these roadblocks. Your best bet would be to first copy the tables to a SAS library and do your operations on those.

 

Also, what do you mean by


read the files(Requirement).


Is it a requirement hat would prevent you from reading a SAS copy?

 

Regards, Jan.

BharathBandi
Calcite | Level 5

Sorry that I couldn't explain properly. 

My question is how to read the table when I'm getting that error??

It is my client requirement that I shouldn't code, that is the reason I'm using this option of assigning library.

 

Thanks Bharath

CaseySmith
SAS Employee

As @jklaverstijn mentioned, the XMLV2 engine is a sequential-only engine.  EG's data grid did not previously support viewing XMLV2 (or XLSX engine data, since also sequential-only).  However, we added support for both of these in EG 7.12 HF2 (Y39002), which you can install via Check for Updates (in EG 7.11 or later, and if your admin allows) or from here:

http://ftp.sas.com/techsup/download/hotfix/HF2/Y39.html

 

Casey


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

BharathBandi
Calcite | Level 5

I will give it a try. Thanks

BharathBandi
Calcite | Level 5

Sorry Casey. Unfortunately I'm still getting the same error. 

CaseySmith
SAS Employee

Hi Bharath,

 

It still isn't clear to me exactly what you are doing that leads to the problem.  Are you running the libname code in your first post then double-clicking the data set in the library in EG's Servers view in an attempt to open it in EG's data grid and then getting the error you posted?


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

BharathBandi
Calcite | Level 5

Since I cannot read those datasets. I'm trying to take copy of it. I  have tried using data builder but there is no visible columns in it.

 

when I'm using code everythings is working fine. 

I used this code :

 

filename Ref "path";
filename SXLEMAP 'path';- created by XML Mapper
libname ref xmlv2 xmlmap=SXLEMAP access=READONLY;  

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 9 replies
  • 4386 views
  • 0 likes
  • 3 in conversation