BookmarkSubscribeRSS Feed
japsas100
Pyrite | Level 9

Dear All,

I would like to migrate a large number of sas files from UNIX to the window environment including sas format & index.

 

Is there any best way to migrate a large number of files?

 

Regards

Japs

10 REPLIES 10
s_lassen
Meteorite | Level 14

I think it may be worth taking a look at PROC CPORT, which writes SAS files to a portable transport format.

 

On the Unix platform use e.g.

filename out "<unit path for transport file>";
proc cport library=<sas library> file=out datecopy;
run;

If you are going to FTP the file from Unix to Windows, I think you can even get away with using an FTP filename for the output.

 

I used the DATECOPY option, which will keep the original creation and modification dates of the tables and catalogs, which I think is very nifty.

 

On the Windows platform, you then use PROC CIMPORT to import the file:

filename cport "Windows file path";
proc cimport library=<Windows library> infile=cport;
run;

Again, if you were planning on using FTP on Windows to get the file from Unix, you can use an FTP filename to read the file from the Unix server.

 

Take a look at the documentation for the procedures, there are many other options available (what to port, how to compress the output files, etc.).

SASKiwi
PROC Star

As well as @s_lassen 's suggestions, another particularly simple way if you have SAS/CONNECT on both source and target servers is to use PROC UPLOAD. For example you can migrate an entire SAS library by doing this:

proc upload inlib=MySource outlib=MyTarget;
run;

More details here: https://documentation.sas.com/?docsetId=connref&docsetTarget=n1vaverm2ole11n1j6q0qg3qtz5g.htm&docset...

 

I recommend you check out the Migration Focus Area for a lot of useful knowledge on this topic: https://support.sas.com/rnd/migration/

japsas100
Pyrite | Level 9

 

@SASKiwi

 

Thanks for the suggestion.

 

Could you please suggest how we can setup sas connect between the sas window and UNIX server?

SASKiwi
PROC Star

@japsas100  - It is a separate SAS product. Do you have it installed and licensed?

japsas100
Pyrite | Level 9

@SASKiwi 

 

Yes, we do have sas connect on the window and Unix environment.

SASKiwi
PROC Star

Is SAS/CONNECT working? Is anyone using it? Or does it need to be configured to get it working?

japsas100
Pyrite | Level 9

@SASKiwi 

 

We never used the sas connect. We need to configure it first.

SASKiwi
PROC Star

Please refer to the documentation for this:

https://documentation.sas.com/?docsetId=biasag&docsetTarget=n04012intelplatform00srvradm.htm&docsetV...

 

I would strongly advise opening a Tech Support track on this as they are in a much better position to guide you through the required steps. You need to run the SAS Deployment Wizard to create the required SAS/CONNECT servers. This needs to be done on both of your servers. There are also decisions to make on the type of authentication to use and any encryption required.

japsas100
Pyrite | Level 9

@SASKiwi  Thanks 

 

One of our servers we don't have sas/connect so we cant transfer files via sas/connect

 

Is there any other way to transfer files from unix to window?

SASKiwi
PROC Star

@japsas100 - Refer to @s_lassen 's response.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 10 replies
  • 1903 views
  • 1 like
  • 3 in conversation