• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1310
  • Last Modified:

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.
0
garyphunt
Asked:
garyphunt
  • 3
  • 2
1 Solution
 
bradanelsonCommented:
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.
0
 
garyphuntAuthor Commented:
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.
0
 
bradanelsonCommented:
PROC UPLOAD should work.  I've uploaded .txt, .pdf, .zip files in the past.  Let me know if that works.  Not sure if you checked if the ftp transfer mode is binary or text.  I know I have to force my transfer mode to binary to work.

Thanks
0
 
garyphuntAuthor Commented:
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.
0
 
garyphuntAuthor Commented:
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.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now