Download presentation
Presentation is loading. Please wait.
Published byShavonne Pierce Modified over 9 years ago
1
Transferring VMS SAS/SPSS Data to UNIX Jeff Hayes Social Science Computing Co-op February 26, 1999
2
Problem 4 SAS and SPSS data sets are stored in binary 4 Binary representations differ across operating systems (VMS and UNIX)
3
Don’t forget… 4 About your files on VMS tapes. Files stored as SAS or SPSS data sets on tape need to be transported 4 For SPSS, data sets need to be based on SPSS version 4 or later
4
Steps to transfer data 4 Exporting the data set(s) on VMS (Run some descriptives!) 4 FTPing the data to UNIX –SPSS portable files as ASCII –SAS transport files as binary 4 Importing the data set(s) on UNIX (Re-run the descriptives and check the data!)
5
UNIX disk allocations 4 Most users have only one account on UNIX –/home - limited to 100 MB. Intended for mail and program files –/aux - limit varies 200-500 MB. (See consultant.) Intended to hold user data files –/temp/fivedays - limited by usage (disk is 4 GB)
6
Use compressed files on UNIX 4 Compressed files can greatly reduce the amount of disk space your files take up 4 SAS and SPSS can read compressed transportable files directly. See: –SSCC How to… #1 How to Write/Read UNIX Compressed SAS Data Sets Directly –SSCC Publication 7-7 Using SPSS on UNIX
7
Translation tools 4 SSCC has two utilities that can read the SPSS/SAS transportable files and write files for many different software packages, e.g. Stata, Limdep, and Excel. –Stat/Transfer (WinCenter, available to any PC in Social Science building) –DBMS/Copy (UNIX, X windows required for graphical interface)
8
SPSS: Exporting data 4 Use a GET command to identify the data set you wish to transfer 4 Use an EXPORT command to create the portable file. (Recommend.por extension) 4 Run descriptive statistics for verifying data transfer’s success
9
SPSS: FTP the data 4 Login to UNIX and get to the directory where you want the data to end up 4 Start FTP (ftp eagle) and login to Eagle 4 get staffdisk2:[100041.spss]gss7296.por gss7296.por 4 When completed, type “quit” to exit FTP
10
SPSS: Importing data 4 Use an IMPORT command to read the portable file on UNIX 4 If you wish, you can use a SAVE command to create a SPSS system file 4 Re-run the descriptive statistics to compare to results on VMS
11
SPSS: Conclusions 4 Consider keeping your data in a SPSS portable file. It’s easy to read in SPSS on UNIX or a PC. It can also be transferred to another package, such as Stata, using Stat/Transfer or DBMS/Copy 4 When transferring SPSS portable files, use FTP in ASCII mode (default between VMS and UNIX)
12
SAS: Exporting data I: Libnames 4 Use a LIBNAME statement with the xport engine and the cc=none option to identify the transport file to be created 4 libname moveout xport “staffdisk:[100041.sas]gss.xpt” cc=none;
13
SAS: Exporting data I: Libnames 4 Use a LIBNAME statement to identify the directory containing the SAS data set to be exported 4 libname movein “staffdisk2:[100041.sas]”;
14
SAS: Exporting data II: PROC COPY 4 Use PROC COPY to create a transport file from a SAS system file or library 4 proc copy in=movein out=moveout; select gss7296;
15
SAS: Exporting data II: PROC COPY 4 The SELECT subcommand copies only the file named to the transport file 4 Omitting the SELECT subcommand will create a transport file containing all of the SAS data sets in the specified directory. PLEASE DON’T. Such a file can be too large. Use SSCC How to… #7 How to Write a Macro to Transport SAS Data Sets from VMS to UNIX to transfer many files.
16
SAS: FTP the data 4 Login to UNIX and get to the directory where you want the data to end up 4 Start FTP (ftp eagle) and login to Eagle 4 Type binary to specify that the transport file will be transferred in binary mode get staffdisk2:[100041.sas]gss7296.xpt gss7296.xpt 4 When completed, type “quit” to exit FTP
17
SAS: Importing data I: Libnames 4 Use a LIBNAME statement with the xport engine to identify the transport file to be read 4 libname moveout xport “/aux/j/jhayes/sas/gss7296.xpt”;
18
SAS: Importing data I: Libnames 4 Use a LIBNAME statement to identify the directory to save the imported SAS data set 4 libname movein “/aux/j/jhayes/sas”;
19
SAS: Importing data II: PROC COPY 4 Use PROC COPY to create a SAS system file or library from a transport file proc copy in=moveout out=movein; select gss7296; 4 The SELECT subcommand must refer to the exact name specified in the PROC COPY/SELECT on VMS
20
SAS: Conclusions 4 FTP transport files in binary mode. (ASCII is the default between VMS and UNIX) 4 Consider keeping your data in a SAS transport file. They can be compressed and read directly by SAS. 4 SAS transport files can also be transferred to another package, such as Stata, using Stat/Transfer or DBMS/Copy
21
SAS: New developments 4 Starting with version 7, SAS data sets (referred to as “tables”) will be platform independent 4 Watch SSCNews for an announcement that version 7 is available on VMS and UNIX with new SSCC publications available
22
Clean-up and Back-up! 4 Get rid of out-of-date, unneeded files before you start this process 4 Please back-up intermediate (.por or.xpt) files or those you are not actively using to tape (4mm or 8mm) or CD and store them off-line
23
Compress! Compress! Compress! > compress gss7296.por reduces disk space used from 1,603,962 to 443,545 > compress gss7296.xpt reduces disk space used from 5,648,960 to 565,812
24
Good luck! 4 Problems? Send log files to consultant@ssc.wisc.edu or stop by during office hours 4 Contact consultant early to request SSCC staff assistance in transferring all VMS files to UNIX.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.