StatTransfer

  EDS > StatTransfer
printer friendly version Print
Page

StatTransfer is a software utility that converts data files from one proprietary format to another.
All major statistical formats are supported like SAS [.sps], Stat [.dta], SPSS [.sav], and Excel [.xls].

About StatTransfer

In the Windows version navigate among screens with different functionality using the tabs
across the top of the StatTransfer window.
This information introduces the basics with details available using the "help" button on each screen.

 

Doing a Simple Transfer


The 'Variables' Tab


The 'Observations' Tab


The 'Options' Tabs


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 preceded by an exclamation mark. For example:

    ! mv mystuff.exp  mystuff.por

Examples of using Stat/Transfer 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';