BookmarkSubscribeRSS Feed
aperezit
Calcite | Level 5

Hi All,

 

I'm not familiar with SAS, is there any easy way to move SAS files to another computer?

10 REPLIES 10
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Same as any other files.  If you mean SAS programs, they are plain text, sas7bdat's are binary data files, catalogs are binary.  So if your ftp'ing remember that.  Otherwise copy and paste.  

aperezit
Calcite | Level 5

thank you for your response and your assistance. Would you happen to know the directory i would copy those files from?

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Whereever you stored them.  SAS has the libname statement which points to a physical location, e.g.:

libname a "c:\temp";

data a.class;
  set sashelp.class;
run;

The file class.sas7bdat will be found in c:\temp in the above example and the program file can be stored with the save as.

jklaverstijn
Rhodochrosite | Level 12

Be careful here. You cannot simply copy/FTP sas datasets back and forth if:

 

  • source and target systems have different data architecture (little vs big endian)
  • source and target systems have different character sets (ebcdicc vs ascii)
  • source and target systems have different encoding (Latin vs UTF8)

Always make certain you are aware of any of these pitfalls. Ask your SAS administrator in case of you don't know.  And inform your peers on this forum of specifics of your source and destination platform to get the proper answer.

 

Hope this helps,

-- Jan.

Kurt_Bremser
Super User

First of all you need to clearly define what you mean by "SAS files". Do you mean

- the files that make up a SAS Installation (executables, shared library files, config files)

- files that contain SAS programs (usually with a .sas extension)

- files that contain user-created SAS data (datasets, views, catalogs)

- files that contain results of SAS work (logs, listings, graphics, Excel, HTML, RTF, PDF and so on) 

?

aperezit
Calcite | Level 5

Hi Kurt,

 

thank you for your assistance.

 

I have a user that is going from windows 7 computer to Windows 10 computer and he would like to keep the files created within SAS. I have the setup files. he wants to keep whatever he has created and worked with in SAS. I don't know all the files he wants but i would assume  

- files that contain user-created SAS data (datasets, views, catalogs)

- files that contain results of SAS work (logs, listings, graphics, Excel, HTML, RTF, PDF and so on) 

 

Thank you

Kurt_Bremser
Super User

In that case, a simple copy should do it. The internal layout of SAS datasets, catalogs and views did not change between the Windows versions.

If you also migrate the SAS system to a newer major version, catalogs might need to be transported or re-created.

 

Just take care to take note of changes in physical path structures because of the newer WIndows release, and make sure these are refledted in library and filename definitions.

 

aperezit
Calcite | Level 5

would you happen to know the folders to copy

Kurt_Bremser
Super User

These are either in the user's programs (see libname and filename statements, or file and infile statements within data steps), or the user him/herself will know them. After all, they created all that.

Reeza
Super User

Is this EG or SAS Base?

If it's SAS Base you can copy the files over but the location of the files are like any other user files, the person should know where they're saved. And to be honest, they should be on a networked, backed up drive, not his/her local drive so you shouldn't need to move any data.This also assumes that the person is getting the same SAS installation, if you're updating to a different version there are possible differences that they may encounter.

 

If the person wants to retain their SAS setup and preferences there's a preference file somewhere and possible the AUTOEXEC file that can be moved as well. The autoexec file should be easy to locate, but the user can change that, and the preference file, I'm not sure where that's located.

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 10 replies
  • 2485 views
  • 1 like
  • 5 in conversation