The main program in this directory is sas2stata. It is a c-shell script to convert SAS data sets into Stata data sets. NOTE FOR INSTALLATION If you are installing this script on a new machine, you need to edit (ascii) file sas2stata and alter the following shell variables which define directory structure assumptions. The values below are examples only, modeled on the structure at RAND. set SAS=/usr/rand/sas/sas # Your SAS executable. set STATA=/net/stata7/stata # Your Stata executable set VSTATA=7 # Your Stata Version number set GAWK=/aging1/a/bin/gawk # Your gawk executable set SCRIPTS=/aging1/a/bin/Sas2stata/Scripts # Directory with gawk scripts set MANPATH=/aging1/a/bin/MAN # Directory with man-page To find out the locations of your SAS, Stata, and gawk executables, type "which sas", "which stata", or "which gawk" at the Unix prompt. If gawk is not in your path, chances are that it is available somewhere else on your system; check with your system administrator. If gawk (the GNU version of awk) is not available, you may obtain it for free from MIT, as described at the end of this file. Type "sas2stata" without arguments for brief instructions on sas2stata usage. A man-page is included: type "man sas2stata". In order to read the man-page, your MANPATH environment variable must include the directory with the man-page. If you are using the c-shell, this is most easily done by adding the following line to your .cshrc: setenv MANPATH /homer/a/bin/MAN:${MANPATH} Note: this version was tar-ed on Wed Oct 5 07:20:28 PDT 2005. The most recent changes to sas2stata were made to correct conversion of SAS special missing values to Stata version 8. Extracting everything from the tarfile should have created two sub-directories (Sas2stata and MAN) and the following files: README sas2stata Sas2stata/Scripts/put.awk Sas2stata/Scripts/dct.awk MAN/man1/sas2stata.1 Center for the Study of Aging RAND 1776 Main St Santa Monica, CA 90401-3208 email: RANDHRSHelp@rand.org Sponsored by the RAND Center for the Study of Aging, with funds from the National Institute on Aging. RAND Corporation, Santa Monica, California. ========================================================================== Instructions on how to obtain gawk, the GNU version of awk. (1) ftp into prep.ai.mit.edu; use login name "anonymous" and your email address as password. (2) type "cd pub/gnu" (3) type "binary" (4) get the gawk programs. sas2stata is currently maintained using the version in "gawk-2.15.6.tar.gz", but there are more recent versions now available and you may want to use the latest release. type "ls" to see what versions can be ftp-ed. 2.15.6 is still available at this writing. The instructions that follow are for 2.15.6. To obtain a more recent version, substitute the appropriate file name and version number in these instructions. To obtain gawk-2.15.6, type: "get gawk-2.15.6.tar.gz" (5) type "quit" to leave the MIT machine. (6) The file you just obtained is in GNU-zipped format, not in Unix compressed format. To unzip it, type "gunzip gawk-2.15.6.tar.gz". If that does not work because you do not have gunzip, ask for help. (7) Type "tar xf gawk-2.15.6.tar" to extract tons of files. These files will be placed in a newly created subdirectory, gawk-2.15.6. (8) Change directory into the newly created subdirectory, gawk-2.15.6. (9) Read the README file that pertains to your machine, if any. (10) Create a makefile for your machine by typing "configure ", where is the name of your machine or operating system. (Typing "configure" without arguments lists acceptable machines. Examples are "sunos41" for SUNs with operating system OS 4.1.x and "rs6000" for the IBM RS6000.) (11) type "make" (12) If all is well, you now have an executable "gawk". Move it to an appropriate location and edit the "sas2stata" file to tell it where you put gawk. You may remove all other gawk files.