BookmarkSubscribeRSS Feed
vijayanand
Obsidian | Level 7

Hi,

 

We are migrating SAS applications running on AIX to Linux. As a part of this , we are using PROC CPORT and CIMPORT to migrate the data.

 

However, we have sas datasets in multiple folders (close to 10000) including all the sub folders in the AIX file system. Each individual folder is considered as one sas library. With this etup, we have to run PROC CPORT / CIMPORT 10000 times. Are there any other options this can be done easily.

 

 

Can rsync be used to transfer the sas datasets between two different operating systems?

 

 

Thanks,

Vijay.

4 REPLIES 4
r_behata
Barite | Level 11

Proc migrate has many advantages over CPORT/CIMPORT. You can convert the entire library at one go instead of converting each dataset.

 

 

https://support.sas.com/rnd/migration/procmigrate/index.html

 

 

The rsync is a great utility to copy over huge volumes of data between the environments and is commonly used. Due to some of the differences between AIX and Linux environments like session encoding and differences in the type of processor you might encounter session encoding errors while performing some operations on the sas datsets prior to doing the proc migrate.

ErikLund_Jensen
Rhodochrosite | Level 12

Hi vijayanand

We did a similar migration from Windows to Linux recently. First 2 questions:

Do your computers share the same network, so you can mount the AIX file system or parts of it on Linux?   

Can you create a SAS dataset with mapping between the data structures - full AIX path to corresponding Linux path?

 

If yes to both, I guess you can do the whole operation om Linux with something like the following macro. You could always refine it with error handling and some progress logging. It worked from Windows to Linux, so I guess it would work from AIX as well. But run it in batch and not from Display Manager or otheer clients. 

 

%macro copydir;
	%do i = 1 to &dircnt; /* number of directories, set in earlier step */

		/* loop to copy directories */
		data _null_; set work.dirmap(firstobs=&i obs=&i); /* dataset with directory mapping from earlier step */
			call symput('sourcedir',sourcedir);
			call symput('targetdir',targetdir);
		run;

		LIBNAME source "&sourcedir";
		LIBNAME target "&targetdir";

		proc copy in=source out=target NOCLONE DATECOPY;
		run;

		LIBNAME source clear;
		LIBNAME target clear;
	%end;
%mend;
Patrick
Opal | Level 21

@ErikLund_Jensen 

You probably should also add CONSTRAINT=YES to not drop such constraints when creating the target datasets.

ErikLund_Jensen
Rhodochrosite | Level 12

@Patrick 

Definitely a good idea, thank you.

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
  • 4 replies
  • 582 views
  • 1 like
  • 4 in conversation