Link to home
Start Free TrialLog in
Avatar of garyphunt
garyphuntFlag for United States of America

asked on

How do I convert a Windows SAS 9.2 file to Linux/Unix SAS file?

I am very confused by this conversion mechanism.  I've been trying to convert a Windows SAS 9.2 file to a Linux/Unix SAS file using Stat/Transfer to create the transport file (.xpt) on the Windows side and PROC COPY on the Unix side.  But on the Unix side the variable names are chopped to 8 characters and the formats are missing.  I know the Unix side handles variable names longer than 8 chars as I've used them there.  I keep running into references to the XPORT engine not supporting the larger SAS 9 variable names, but it is not clear if that is only when going to SAS V6.  There must be a way to move SAS data files between 2 systems that support long variable names and preserve the formats.  Help?
Thanks.
Avatar of bradanelson
bradanelson
Flag of United States of America image

Have you tried just ftp'ing the file to unix?  It has worked for me in the past.  Make sure you set the ftp program to use the binary setting.  Another thing I do within SAS is PROC UPLOAD and PROC DOWNLOAD when using the RSUBMIT process on my PC SAS code.
Avatar of garyphunt

ASKER

Bradanelson,
Thanks for your ideas.  We use a product called SSH Secure File Transfer.  It has a drag and drop interface.  Moving a file directly from Red Hat Linux (that's what I found out is on the server) to Windows works fine between the different dataset formats.  Windows SAS can read it although it gives a Note indicating it realizes it is from a different platform.  However, I've had no luck dragging the file from Windows to Linux.  Linux SAS (9.2 also) can't read it.  Haven't ever used PROC UPLOAD, but I'll look into that.  FYI, I have to Zip the files before moving them as they are too large to move otherwise.  If PROC UPLOAD works across the network without compression, it might not be feasible.
ASKER CERTIFIED SOLUTION
Avatar of bradanelson
bradanelson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Bradanelson,
Again, thanks for your feedback.  The solution I finally found involved CPORT and CIMPORT.  I still don't know why PROC COPY using the XPORT engine wouldn't work since it was going between two V9 SAS platforms.  But your suggestion of using PROC UPLOAD and DOWNLOAD was an interesting twist that I hadn't thought about.   This was the only response I got so I'm closing the case with your recommendation.
This didn't help me understand why the XPORT engine behaved as it did, but it did make me aware of a new option and I'll be able to explore this path when time allows.  The solution I finally used was using CPORT and CIMPORT.