*options obs=100; /*------------------------------------------------ by Jean Roth Mon Jul 28 15:25:07 EDT 2008 Report errors to jroth@nber.org This program is distributed under the GNU GPL. See end of this file and http://www.gnu.org/licenses/ for details. ----------------------------------------------- */ * The following line should contain the directory where the SAS file is to be stored ; libname library "."; * 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:\ ; FILENAME datafile pipe "unzip -p /homes/data/cps-basic/rwdec07.zip "; * The following line should contain the name of the SAS dataset ; %let dataset = cpsrwdec07 ; DATA library.&dataset ; INFILE datafile LRECL = 2300 missover ; /*----------------------------------------------*/ options nocenter ; *options compress=yes; *Choose compress=yes to save space ; *Choose compress=no if converting to another package using transfer software ; *options pagesize=59 linesize=72; /*---------------------------------------------- A -1 means Blank; Not in Universe; or In Universe, Met No Conditions; Sometimes, -1 is present but not described in the codebook. If the variable has a decimal, it will be resolved as -1/# of decimals These are usually 'Not in Universe' values also. The following changes in variable names have been made, if necessary: '$' to 'd'; '-' to '_'; '%' to 'p'; ($ = unedited data; - = edited data; % = allocated data) ----------------------------------------------*/ attrib qstnum length=$5 label="Unique household identifier. Valid o"; attrib occurnum length=$2 label="Unique person identifier. Valid only"; attrib pwsswgt length=8 label="FINAL WEIGHT"; attrib pwcmpwgt length=8 label="Composited Final Weight. Used to cre"; INPUT @2 qstnum $5. @8 occurnum $2. @11 pwsswgt 10.4 @22 pwcmpwgt 10.4 ; /*---------------------------------------------- The PROC FORMAT statement will store the formats in a sas data set called fcprwdec07 . To use the stored formats in a subsequent program, include something like this: proc format cntlin=library.fcprwdec07; PROC freq; tables PULAYCK1 ; format PULAYCK1 PULAYCKa.; For more information, consult the PROC FORMAT section of the SAS Procedures Guide ----------------------------------------------*/ PROC FORMAT cntlout=library.fcprwdec07; ; proc print data=library.&dataset (obs=6); FORMAT ; proc contents data=library.&dataset; /* Copyright 2008 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. */