1 The SAS System 12:40 Wednesday, October 24, 2018 NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software 9.4 (TS1M3 MBCS3170) Licensed to NATIONAL BUREAU OF ECONOMIC RESEARCH, Site 70111350. NOTE: This session is executing on the Linux 2.6.32-696.18.7.el6.x86_64 (LIN X64) platform. NOTE: Updated analytical products: SAS/STAT 14.1 NOTE: Additional host information: Linux LIN X64 2.6.32-696.18.7.el6.x86_64 #1 SMP Wed Jan 3 19:31:16 CST 2018 x86_64 Scientific Linux release 6.9 (Carbon) You are running SAS 9. Some SAS 8 files will be automatically converted by the V9 engine; others are incompatible. Please see http://support.sas.com/rnd/migration/planning/platform/64bit.html PROC MIGRATE will preserve current SAS file attributes and is recommended for converting all your SAS libraries from any SAS 8 release to SAS 9. For details and examples, please see http://support.sas.com/rnd/migration/index.html This message is contained in the SAS news file, and is presented upon initialization. Edit the file "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.08 seconds cpu time 0.00 seconds 1 *options obs=55; 2 options mprint mlogic symbolgen; 3 options nocenter; 4 *by Jean Roth, jroth@nber.org, 2007-11-09 ; 5 *NOTE: This program is distributed under the GNU GPL. See end of 6 *this file and http://www.gnu.org/licenses/ for details. ; 7 8 * The following line should contain the directory 9 where the SAS file is to be stored ; 10 11 libname library "/homes/data/hcris/snf/2540-96"; NOTE: Libref LIBRARY was successfully assigned as follows: Engine: V9 Physical Name: /homes/data/hcris/snf/2540-96 12 13 * The following line should contain 14 the complete path and name of the raw data file. 15 On a PC, use backslashes in paths as in C:\ ; 16 17 %macro loop(FYEAR=,LYEAR=); 18 %do year=&FYEAR. %to &LYEAR.; 2 The SAS System 12:40 Wednesday, October 24, 2018 19 proc printto log ="/homes/data/hcris/snf/2540-96/read_snf_rpt_alpha&year..log" new; 20 proc printto print="/homes/data/hcris/snf/2540-96/read_snf_rpt_alpha&year..lst" new; 21 FILENAME datafile "/homes/data/hcris/snf/2540-96/snf_&year._ALPHA.CSV"; 22 23 * The following line should contain the name of the SAS dataset ; 24 %let dataset=snf_alpha2540_96_&year._long ; 25 26 data library.&dataset.; 27 28 *Variable Maximum 29 --------- ------- 30 RPT_REC_NUM 64331 31 WKSHT_CD "S89R000" 32 LINE_NUM "09919" (min="00000". "00100" I think means "1". "00101" can mean "101" or "1.01", depending on the 32 ! worksheet) 33 CLMN_NUM "0600" (means "6", I think. Values are 0000, 0100, 0200, 0300, 0400, 0500, and 0600) 34 ; 35 length rpt_rec_num 5. wksht_cd $7. line_num $5. clmn_num $4. alphnmrc_itm_txt $45. default = 4 ; 36 * '2C' is hexadecimal for decimal 44 which represents ',' ; 37 * '0D' is hexadecimal for decimal 13 which represents '\r', which is the carriage return character; 38 infile datafile dsd delimiter='2C0D'x ; 39 INPUT 40 rpt_rec_num 41 wksht_cd $ 42 line_num $ 43 clmn_num $ 44 alphnmrc_itm_txt $ 45 ; 46 47 proc means data=library.&dataset. max n; 48 title "Inspect maximums: Four bytes will retain six significant digits" ; 49 title2 "&dataset."; 50 proc freq data=library.&dataset.; 51 title ""; 52 tables WKSHT_CD LINE_NUM CLMN_NUM ; 53 proc contents data=library.&dataset.; 54 proc sort data=library.&dataset. out=library.uniq_alpha_&year. nodupkey; 55 by wksht_cd clmn_num line_num ; 56 57 %end; 58 %mend; 59 %loop(FYEAR=1995,LYEAR=2012); MLOGIC(LOOP): Beginning execution. MLOGIC(LOOP): Parameter FYEAR has value 1995 MLOGIC(LOOP): Parameter LYEAR has value 2012 SYMBOLGEN: Macro variable FYEAR resolves to 1995 SYMBOLGEN: Macro variable LYEAR resolves to 2012 MLOGIC(LOOP): %DO loop beginning; index variable YEAR; start value is 1995; stop value is 2012; by value is 1. SYMBOLGEN: Macro variable YEAR resolves to 1995 MPRINT(LOOP): proc printto log ="/homes/data/hcris/snf/2540-96/read_snf_rpt_alpha1995.log" new; NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 2:45.56 cpu time 43.82 seconds