Dear All,
We are upgrading sas environment from Unix 9.3 to window 9.4 .
We would like to transfer large number of files including sas datasets, format, index files.
looking at some automated method to transfer these files. I know CIMPORT method but this is taking a long time.
Please suggest the fastest method. Can we connect window 9.4 to unix 9.3? if yes we can write sas macro to transfer these files.
IMO if you need indices (index files) CPORT/CIMPORT is going to be you best, most supportable bet. If you DON'T need indices then you can always use CEDA, with a performance hit. Just SCP, SFTP or mount the file system as need and CEDA works, for the most part. https://go.documentation.sas.com/?docsetId=lrcon&docsetTarget=n0oj2nagtyy32yn17pj01t6vytaw.htm&docse...
If you have SAS/CONNECT, you can use proc upload/download.
Thanks
How to see whether SAS/CONNECT already set up on both the environment?
if it's not set up, how we can setup SAS/CONNECT?
Run proc setinit to see what is licensed.
If you get SAS/Connect working then it might also be worth looking into Proc Migrate - and here a sample for Migrating across Computers
Not too sure Unix to Windows is much of an upgrade...
Anyways. To use sas/connect you need a listening process (called spawner in SAS lingo) on the "server" side.
Once it's running, you can signon to the server.
You can then submit code from the client to the server using the rsubmit statement.
This code can be a proc download (or proc upload) or proc migrate, for example.
Lots of resources online.
@ChrisNZ wrote:
Not too sure Unix to Windows is much of an upgrade...
Second that.
The main resource for SAS/CONNECT documentation is found here.
Hi there, PROC MIGRATE documentation writer here! I'm updating the SAS/CONNECT example to use more current syntax for a spawner. Let me know if you see any problems here. The changes won't publish for a few months and this is a draft.
The following MIGRATE procedure example migrates members in a SAS library to take advantage of features that are provided in a newer SAS release. The example uses a SAS/CONNECT server, which is required in some cases. In this example, a spawner starts a session on the SAS/CONNECT server.
options comamid=tcp; /*1*/
%let myserver=host.name.com; /*2*/
signon myserver.1234 user=_prompt_; /*3*/
libname source '/mydata' server=myserver.1234; /*4*/
libname target v9 '/mylinuxdata'; /*5*/
proc migrate in=source out=target; /*6*/
run;
signoff myserver; /*7*/
The COMAMID= option specifies to use TCP/IP as the communications access method for connecting to the SAS/CONNECT server.
The %LET statement creates the myserver
macro variable. Use this variable to specify the name of your remote SAS/CONNECT server.
The SIGNON statement instructs the spawner to start a session on the SAS/CONNECT server that is named in the myserver
macro variable. Change the number in the statement to your server’s port number. This statement specifies to prompt for the user ID and password, but you could include them here.
This LIBNAME statement assigns the source
library to the location of the library that is to be migrated. The SERVER= argument specifies the myserver
macro variable and the port number.
This LIBNAME statement assigns the target
library to an existing location where the migrated library is to be stored.
PROC MIGRATE migrates the library members from the source
library to the target
library.
The SIGNOFF command ends the connection to the server.
In general, CEDA is invoked when you migrate to an incompatible operating environment. For more information about CEDA, see Cross-Environment Data Access in SAS Programmer’s Guide: Essentials.
@maggiem_sas Thank you for taking the time to bring real value here.
Can you also point to what is migrated and what is not? indexes? all catalog entry types? sort order when changing encoding? audit trail? etc
Thanks for the like, @ChrisNZ . Here are the details on what is migrated: Concepts: MIGRATE Procedure . For data sets,
PROC MIGRATE retains alternate collating sequence, compression, created and modified datetimes, deleted observations, encryption, extended attributes, indexes, integrity constraints, and passwords. See the link for more details.
There is a tricky scenario that tends to affect customers with DBCS data - If you are changing to a different character encoding that uses more bytes to represent the characters, you might need to use the CVP engine as part of the copy or migration process, to avoid truncation. This works fine with PROC COPY, but CVP is not currently supported by PROC MIGRATE. We like PROC MIGRATE better than PROC COPY for migration, so we came up with a workaround. It's a little complicated but we recommend a two-step process where you (1) COPY with the CVP engine on the source environment to avoid CEDA. Then (2) MIGRATE on the target to change the encoding and data representation. If the library has formats catalogs, you can use a two step process with PROC FORMAT to expand the length and avoid truncation.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.