BookmarkSubscribeRSS Feed
Ryanwang
Calcite | Level 5

When I converted the dataset with %xpt2loc I found that creating the XPT in V8 format via %loc2xpt was missing the dataset labels. Dose anyone know about it? Thanks!

2 REPLIES 2
ballardw
Super User

Your subject line references %loc2xpt. The body of your question asks about %xpt2loc. Which macro did you actually use?

It may also help to show the code you used for the call to the macro so we know which options you may have used.

 


@Ryanwang wrote:

When I converted the dataset with %xpt2loc I found that creating the XPT in V8 format via %loc2xpt was missing the dataset labels. Dose anyone know about it? Thanks!


 

 

Tom
Super User Tom
Super User

Works fine for me:

data have(label='Class data');
  set sashelp.class;
run;

filename xpt temp;
%loc2xpt(libref=work,memlist=have,filespec=xpt,format=v8);
proc delete data=have; run;
%xpt2loc(libref=work,memlist=have,filespec=xpt);
proc contents data=work.have;
run;

Result:

Tom_0-1715793697462.png

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 2 replies
  • 462 views
  • 2 likes
  • 3 in conversation