BookmarkSubscribeRSS Feed
shlomiohana
Obsidian | Level 7

Hello,

 

Today I use SAS Enterprise Guide 7.15 on a Linux server.

 

I need to create a table with an index to the windows server I run the following code:

libname tavtdata "/cifs/sastest2012 ";

data tavtdata.areamatch (outrep=windows_64);
set tavtdata.areamatch;
run;

data tavtdata.areamatch (outrep=windows_64 index=(areaCode));
set tavtdata.areamatch;
run;

The error obtained in creating the index:

 

shlomiohana_1-1650830540376.jpeg

I will ask for your help on how to create an index in Linux and the table will be windows_64.

 

Thanks.

 

5 REPLIES 5
Tom
Super User Tom
Super User

What you are trying to do does not make much sense.  That and the fact that it is probably impossible is probably why it does not work.

 

If you want to make an index you have to do with a native format file.

Why do you want to make the dataset in a format that is not native to the version of SAS you using.

Why do want to make an index?

Why not just sort the data instead?

shlomiohana
Obsidian | Level 7

There is a system that is on a windows server until today my Guide was on a windows server so I had no problem running the code I attached, but now my Guide is on a Linux server and I need to create this table with an index, but the system is on the windows server does not accept the index created in Linux, so I used the option outrep = windows_64 so that the output would be in windows and not in Linux.

SASKiwi
PROC Star

It is still not clear what you are trying to do here. Are you trying to share a SAS data library between Linux and Windows? The LIBNAME you use suggests you are storing it in a Linux folder. Was this library first created on Windows?

 

EDIT: I'm guessing that your original library is simply a copy from Windows in CEDA-format for cross-platform compatibility. Creating a new Linux-specific library should solve your problem:

libname tavtdata "/cifs/sastest2012 ";
libname tavtdatl "/cifs/linux/sastest2012 ";

data tavtdatl.areamatch (index = (areacode));
set tavtdata.areamatch;
run;
andreas_lds
Jade | Level 19

So you have two sas environments running on different operating systems.

I would just drop the idea of creating an index and sort the data. Then you will have a more or less increase of runtime depending on the system you are using the data, but this is the only way i can think of, that allows using one dataset on two different os.

Kurt_Bremser
Super User

@shlomiohana wrote:

There is a system that is on a windows server until today my Guide was on a windows server so I had no problem running the code I attached, but now my Guide is on a Linux server and I need to create this table with an index, but the system is on the windows server does not accept the index created in Linux, so I used the option outrep = windows_64 so that the output would be in windows and not in Linux.


So create the index on the Windows server after moving the file there, if simply sorting is not an option.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 446 views
  • 1 like
  • 5 in conversation