Architecting, installing and maintaining your SAS environment

moving SAS files to another computer

Reply
New Contributor
Posts: 4

moving SAS files to another computer

Hi All,

 

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

Super User
Super User
Posts: 9,441

Re: moving SAS files to another computer

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.  

New Contributor
Posts: 4

Re: moving SAS files to another computer

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

Super User
Super User
Posts: 9,441

Re: moving SAS files to another computer

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.

Valued Guide
Posts: 531

Re: moving SAS files to another computer

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.

Super User
Posts: 9,925

Re: moving SAS files to another computer

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) 

?

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
New Contributor
Posts: 4

Re: moving SAS files to another computer

Posted in reply to KurtBremser

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

Super User
Posts: 9,925

Re: moving SAS files to another computer

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.

 

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
New Contributor
Posts: 4

Re: moving SAS files to another computer

Posted in reply to KurtBremser

would you happen to know the folders to copy

Super User
Posts: 9,925

Re: moving SAS files to another computer

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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Super User
Posts: 23,343

Re: moving SAS files to another computer

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.

Ask a Question
Discussion stats
  • 10 replies
  • 144 views
  • 1 like
  • 5 in conversation