1 The SAS System 14:15 Wednesday, October 5, 2005 NOTE: Copyright (c) 1999-2001 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software Release 8.2 (TS2M0) Licensed to HARVARD SCHOOL OF PUBLIC HEALTH-INSTRUCTIONAL COMP, Site 0001177014. NOTE: This session is executing on the SunOS 5.9 platform. This message is contained in the SAS news file, and is presented upon initialization. Edit the files "news" in the "misc/base" directory to display site-specific news and information in the program log. The command line option "-nonews" will prevent this display. ---------------------------------------------------------- NOTE: SAS initialization used: real time 0.77 seconds cpu time 0.16 seconds 1 *options obs = 100 ; 2 options nocenter ; 3 4 /*------------------------------------------------ 5 by Jean Roth Wed Oct 5 11:41:17 EDT 2005 6 This program reads the National Drug Code 7 applicat Data File 8 Report errors to jroth@nber.org 9 This program is distributed under the GNU GPL. 10 See end of this file and 11 http://www.gnu.org/licenses/ for details. 12 ----------------------------------------------- */ 13 14 15 * The following line should contain the directory where the SAS file is to be stored ; 16 17 libname library "./"; NOTE: Libref LIBRARY was successfully assigned as follows: Engine: V8 Physical Name: /disk/nber10/SCCS/ndc 18 19 * The following line should contain 20 the complete path and name of the raw data file. 21 On a PC, use backslashes in paths as in C:\ ; 22 23 FILENAME datafile pipe "gunzip -dc /homes/data/ndc/applicat.dat.gz "; 24 25 * The following line should contain the name of the SAS dataset ; 26 27 %let dataset = applicat ; 28 29 DATA library.&dataset ; 30 31 INFILE datafile LRECL = 20000 ; 32 33 attrib listing_seq_no length=6 label="Linking field to LISTINGS"; 34 attrib appl_no length=$6 label="Number of New Drug Application if applicable" ; 35 attrib prod_no length=$3 label="Number used to identify the products of a New Drug Application"; 2 The SAS System 14:15 Wednesday, October 5, 2005 36 37 38 39 INPUT 40 41 @1 LISTING_SEQ_NO 10. 42 @11 APPL_NO $6. 43 @17 PROD_NO $3. 44 45 ; 46 NOTE: The infile DATAFILE is: Pipe command="gunzip -dc /homes/data/ndc/applicat.dat.gz " NOTE: 39032 records were read from the infile DATAFILE. The minimum record length was 17. The maximum record length was 20. NOTE: SAS went to a new line when INPUT statement reached past the end of a line. NOTE: The data set LIBRARY.APPLICAT has 38468 observations and 3 variables. NOTE: DATA statement used: real time 9.15 seconds cpu time 1.79 seconds 47 proc print data = library.&dataset ( obs = 10 ) ; 48 NOTE: There were 10 observations read from the data set LIBRARY.APPLICAT. NOTE: The PROCEDURE PRINT printed page 1. NOTE: PROCEDURE PRINT used: real time 0.13 seconds cpu time 0.01 seconds 49 proc contents data = library.&dataset ; NOTE: The PROCEDURE CONTENTS printed page 2. NOTE: PROCEDURE CONTENTS used: real time 0.61 seconds cpu time 0.06 seconds NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 11.13 seconds cpu time 2.07 seconds