BookmarkSubscribeRSS Feed
japsas100
Pyrite | Level 9

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.

12 REPLIES 12
JerryV
SAS Employee

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...

japsas100
Pyrite | Level 9

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?

 

 

japsas100
Pyrite | Level 9
Thanks

Sas connect license available in both the environment.

How we use sas connect configure in order to transfer files
Patrick
Opal | Level 21

If you get SAS/Connect working then it might also be worth looking into Proc Migrate - and here a sample for Migrating across Computers

ChrisNZ
Tourmaline | Level 20

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.

 

maggiem_sas
SAS Employee

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.

Example Code

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*/
  1. The COMAMID= option specifies to use TCP/IP as the communications access method for connecting to the SAS/CONNECT server.

  2. The %LET statement creates the myserver macro variable. Use this variable to specify the name of your remote SAS/CONNECT server.

  3. 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.

  4. 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.

  5. This LIBNAME statement assigns the target library to an existing location where the migrated library is to be stored.

  6. PROC MIGRATE migrates the library members from the source library to the target library.

  7. The SIGNOFF command ends the connection to the server.

Key Ideas

  • Here are two reasons to use a SAS/CONNECT or SAS/SHARE server:
    • You can use a server to migrate across machines when you do not have direct access.
    • You are required to use a server if both of the following two conditions are met:
      • The source library contains catalogs.
      • Processing would invoke CEDA in the target session.

      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.

  • If you have direct access to the source library through NFS, and if incompatible catalogs are not present, then you can migrate without using a SAS/CONNECT or SAS/SHARE server. 
  • Alternatively, if you have direct access to the source library through NFS, then you might be able to use CEDA instead of migrating. This Read-Only access is automatic and transparent, but you must be aware of the restrictions. See Cross-Environment Data Access in SAS Programmer’s Guide: Essentials.

 

ChrisNZ
Tourmaline | Level 20

@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

 

 

maggiem_sas
SAS Employee

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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 12 replies
  • 1382 views
  • 5 likes
  • 6 in conversation