set more off capture log close capture log using linkco2004us_den.log, replace capture set mem 5g ** -----------------------------------------------; ** This program reads the 2004 U.S. Denominator Linked Birth Infant Death Birth Cohort Data Data File ** by Jean Roth , jroth@nber.org , Tue Mar 9 16:40:24 EST 2010 ** Please report errors to jroth@nber.org ** NOTE: This program is distributed under the GNU GPL. ** See end of this file and http://www.gnu.org/licenses/ for details. ** Run with do linkco2004us_den ** -----------------------------------------------; ** The following line should contain ** the complete path and name of the raw data file. ** On a PC, use backslashes in paths as in C:\ ; local dat_name "/tmp/LinkCO03PSUSDen.dat" ** The following line should contain the path to your output '.dta' file ; local dta_name "linkco2004us_den" ** The following line should contain the path to the data dictionary file ; local dct_name "linkco2004us_den.dct" ** The following line should contain the complete path and name of the compressed data file. ; local compressed "/homes/data/lbid/ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/DVS/cohortlinkedus/LinkCO04USDen.dat.bz2" ** Removing dat_name capture rm `dat_name' ** Uncompressing the raw data file to /tmp ** Note that /tmp must have enough space to write the uncompressed file ! bzcat `compressed' > "`dat_name'" ** The line below does NOT need to be changed ; infile using "`dct_name'", using("`dat_name'") clear ** Removing the temp file when finished ! rm -f "`dat_name'" note: by Jean Roth, jroth@nber.org Tue Mar 9 16:40:24 EST 2010 compress saveold linkco2004us_den,replace ** Run commands from directory with data capture erase linkco2004us_den.dta.zip ! zip linkco2004us_den.dta.zip linkco2004us_den.dta *capture erase linkco2004us_den.dta exit ** Copyright 2010 shared by the National Bureau of Economic Research and Jean Roth ; ** ** National Bureau of Economic Research. ; ** 1050 Massachusetts Avenue ; ** Cambridge, MA 02138 ; ** jroth@nber.org ; ** ** This program and all programs referenced in it are free software. You ; ** can redistribute the program or modify it under the terms of the GNU ; ** General Public License as published by the Free Software Foundation; ; ** either version 2 of the License, or (at your option) any later version. ; ** ** This program is distributed in the hope that it will be useful, ; ** but WITHOUT ANY WARRANTY -- without even the implied warranty of ; ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; ** GNU General Public License for more details. ; ** ** You should have received a copy of the GNU General Public License ; ** along with this program -- if not, write to the Free Software ; ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 ; ** USA. ;