Abstract: This document is a guide to using Stat/Transfer on the workstations in EDS or on Columbia's Cunix Cluster. Stat/Transfer is designed to simplify the transfer of statistical data between different software programs.
Stat/Transfer is also available on Cunix. Click here to go to the Cunix section.
Discounts on Stat/Transfer are available for students, faculty, and staff through Stata Corp. Go to the Stata site license page and scroll to the bottom for instructions on ordering Stat/Transfer.
Before You Start to Use Stat/Transfer for Windows in EDS:
- If you haven't already done so, create yourself a directory in the "MyDocs" folder naming your folder using your UNI.
- Close any other applications that are using the data you are about to convert. You may get a "sharing exception error" otherwise.
Stat/Transfer for Windows
To start Stat/Transfer, select Start, Programs, Data Tools and then Stat/Transfer. This will bring up the following screen:
The various tabs of the Stat/Transfer interface allow you to set options and preferences before doing the actual transfer. The default tab, 'Transfer', allows you to perform routine transfers with a few mouse clicks:
- Select an input file type.
- Select the input file.
- Select the output file type.
- (optional) Select any options you need on the Variables, Observations, or Options screens.
Stat/Transfer will then make up an output file specification for you. This will consist of the input directory and file name with the correct extension appended for your new output type, although you can change it if you like.
- Click on `Transfer' and you are done.
Changing Defaults
By default, all variables and cases are selected. You can change the default in the next two screens.
The 'Variables' Screen
The 'Variables' screen allows you to choose which variables will be transferred to your output data set. You can also choose the storage types of your variables and activate the 'Optimize' feature, which makes an extra pass through your data to determine the smallest possible storage type for each variable without losing any data. You can then, if you wish, further fine-tune the storage type of each variable.

The 'Observations' Screen
The 'Observations' screen allows you to select just the records you want in your output file. You can enter arbitrary arithmetic expressions and use powerful sampling functions. Selection syntax is designed for ease of use. For instance you can use wildcards and enter lists of conditions separated by commas as in:
where state = CA,AZ,W*,O*
The 'Options' Screens
The 'Options' screens allow you to control how Stat/Transfer works. You can control, for instance, whether you want to be warned if a file is about to be overwritten, data and time formats, and whether you want Stat/Transfer to automatically make an optimization pass when necessary to minimize the size of your output data set.
Stat/Transfer on the Cunix Cluster
To start Stat/Transfer, type st at the $ prompt. Once the program is started, you will see the Stat/Transfer internal st> prompt.
Getting Help in Stat/Transfer
You can type help for a brief syntax and format guide:
st> help
For further help type:
help commands For help on the root Stat/Transfer commands
help copy For help on copying one format to another
help formats For help on the formats you can transfer
help set For help on 'setting' options
help running For help on running S/T from a shortcut or an OS prompt
st>
Moving Data from One Format to Another
The syntax to copy files from one format to another is
copy file1.ex1 file2.ex2
where ex1 and ex2 are the proper extensions for each filetype. >
Note that Stat/Transfer assumes the file type based on the file extension. Type help formats for the accepted list. If your file has some other extension, you need to rename it. You can do this inside Stat/Transfer with a shell command, i.e., a unix command preceeded by an exclamation mark. For example:
! mv mystuff.exp mystuff.por
Examples of using Stat/Transfer
-
To copy an Spss portable file to a Stata dataset, type
the following:
copy mygss00.por nygss00.dta -
To copy an comma delimited file to a SAS dataset, type
copy myraw.csv myraw.sas7bda
Special SAS Options in Stat/Transfer
Stat/Transfer can use value labels stored in a PROC FORMAT libraries, however, these labels must first be converted to a special format. To do this, run the following SAS program:
libname mylib "[path]";
proc format library=mylib cntlout=mylib.sas_fmts;
run;
where "path" is the full path to the directory that contains your format library. You must us ".sas_fmts" as the file name. The resulting file will have the name sas_fmts.sas7bdat.
Once you have prepared the format library, you must set two options within Stat/Transfer:
set read-sas-fmts yes
set read-fmt-name sas_fmts.sas7bdat
Now you are ready to do the transfer. For example:
copy mydata.sas7bdat mydata.por
Note that Stat/Transfer cannot convert all types of SAS PROC FORMAT definitions. In particular, you will lose definitions of the type:
VALUE DAYFMT 0 = 'DIDNT HAVE WAIT'
1-24 = 'LESS THAN 1 DAY'
24-48 = '1 UP TO 2 DAYS';

