1 The SAS System 23:50 Sunday, May 14, 2006 NOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) 9.1 (TS1M3) Licensed to UNIV OF CA/BERKELEY, Site 0029107012. NOTE: This session is executing on the SunOS 5.8 platform. NOTE: SAS 9.1.3 Service Pack 3 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 Welcome to SAS 9.1.3 licensed to the UCB Demography Lab For a short time it will be possible to run the old version of sas by typing sas81. Soon, however, this will be the only version availalbe -- I sure hope you like it. NOTE: SAS initialization used: real time 0.29 seconds cpu time 0.09 seconds 1 libname zh '~/taiwan/fies/sasdata'; NOTE: Libref ZH was successfully assigned as follows: Engine: V9 Physical Name: /home/brass/hdir0/ebenstei/taiwan/fies/sasdata 1 ! 2 options ls=72; 3 %macro one(q); 4 5 DATA zh.data&q; 6 SET zh.new&q; 7 KEEP hhid weight areacode 7 ! urban 8 serial agrtype agr_area 8 ! agr_work 9 person1-person16 relate1-relate16 sex1-sex16 9 ! age1-age16 10 educ1-educ16 grad1-grad16 empact1-empact16 10 ! empind1-empind16 11 empocc1-empocc16 part1-part16 empsoc1-empsoc16 11 ! empsta1-empsta16 12 empsit1-empsit16 earner1-earner16 marry1-marry16 12 ! outpat1-outpat16 13 discrg1-discrg16 insnhi1-insnhi16 ins1si1-ins1si16 13 ! ins1ms1-ins1ms16 14 ins2si1-ins2si16 ins2ms1-ins2ms16; 15 16 DATA zh.person&q; 17 SET zh.data&q; 2 The SAS System 23:50 Sunday, May 14, 2006 18 KEEP hhid personid weight areacode urban 18 ! serial relate 19 sex age educ graduate emp_act 19 ! emp_ind emp_occ 20 part emp_soc emp_stat emp_situ earner marry 20 ! outpatnt 21 discharg insnhi inssi1 insms1 inssi2 21 ! insms2 ; 22 ARRAY per{16} person1-person16; 23 ARRAY rel{16} relate1-relate16; 24 ARRAY sx{16} sex1-sex16; 25 ARRAY ag{16} age1-age16; 26 ARRAY edu{16} educ1-educ16; 27 ARRAY grd{16} grad1-grad16; 28 ARRAY act{16} empact1-empact16; 29 ARRAY ind{16} empind1-empind16; 30 ARRAY occ{16} empocc1-empocc16; 31 ARRAY prt{16} part1-part16; 32 ARRAY soc{16} empsoc1-empsoc16; 33 ARRAY esta{16} empsta1-empsta16; 34 ARRAY situ{16} empsit1-empsit16; 35 ARRAY ear{16} earner1-earner16; 36 ARRAY mar{16} marry1-marry16; 37 ARRAY out{16} outpat1-outpat16; 38 ARRAY dis{16} discrg1-discrg16; 39 ARRAY nhi{16} insnhi1-insnhi16; 40 ARRAY si1s{16} ins1si1-ins1si16; 41 ARRAY sm1s{16} ins1ms1-ins1ms16; 42 ARRAY si2s{16} ins2si1-ins2si16; 43 ARRAY sm2s{16} ins2ms1-ins2ms16; 44 DO iii=1 TO 16; 45 IF (per{iii} NE . AND per{iii} NE 0) THEN DO; 46 personid = per{iii}; 47 relate = rel{iii}; 48 sex = sx{iii}; 49 age = ag{iii}; 50 educ = edu{iii}; 51 graduate = grd{iii}; 52 emp_act = act{iii}; 53 emp_ind = ind{iii}; 54 emp_occ = occ{iii}; 55 part = prt{iii}; 56 emp_soc = soc{iii}; 57 emp_stat = esta{iii}; 58 emp_situ = situ{iii}; 59 earner = ear{iii}; 60 marry = mar{iii}; 61 outpatnt = out{iii}; 62 discharg = dis{iii}; 63 insnhi = nhi{iii}; 64 inssi1 = si1s{iii}; 65 insms1 = sm1s{iii}; 66 inssi2 = si2s{iii}; 67 insms2 = sm2s{iii}; 68 OUTPUT; 69 END; 70 END; 71 3 The SAS System 23:50 Sunday, May 14, 2006 72 LABEL 73 hhid ='Sample household id' 74 personid ='Internal hhid' 75 weight ='Sample weight' 76 areacode ='Area Code' 77 urban ='Urbanization' 78 serial ='Serial number of households' 79 agrtype = "Farm/nonfarm household" 80 agr_area = "Farm hhold class by cult land size" 81 agr_work = "Farm hhold class by working hours" 82 83 relate ='Relationship to head' 84 sex ='Gender' 85 age ='Age' 86 educ ='Highest level school attended' 87 graduate ='Graduate status' 88 emp_act ='Employment class by sector of activity' 89 emp_ind ='Employment class by industry' 90 emp_occ ='Employment class by occupation' 91 part ='With part time work' 92 outpatnt ='Times of outpatient' 93 discharg ='Staying days of disch from hospital' 94 emp_soc ='Employment class by social-eco status' 95 emp_stat ='Employment status' 96 emp_situ ='Employment situation' 97 earner ='Income recipient' 98 marry ='Marital status' 99 insnhi ="Insured person's status of nat hlth ins" 100 inssi1 ="Insured person's status of soc ins (1)" 101 insms1 ="Insured months of social insurance (1)" 102 inssi2 ="Insured person's status of soc ins (2)" 103 insms2 ="Insured months of social insurance (2)"; 104 105 PROC CONTENTS; 106 107 run; 108 %mend; 109 %one(99); NOTE: There were 13801 observations read from the data set ZH.NEW99. NOTE: The data set ZH.DATA99 has 13801 observations and 360 variables. NOTE: DATA statement used (Total process time): real time 5.55 seconds cpu time 1.91 seconds NOTE: There were 13801 observations read from the data set ZH.DATA99. NOTE: The data set ZH.PERSON99 has 49927 observations and 27 variables. NOTE: DATA statement used (Total process time): real time 1.49 seconds cpu time 0.51 seconds NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.22 seconds cpu time 0.07 seconds 4 The SAS System 23:50 Sunday, May 14, 2006 NOTE: The PROCEDURE CONTENTS printed pages 1-2. 110 %one(00); WARNING: Not all variables in the list person1-person16 were found. WARNING: Not all variables in the list relate1-relate16 were found. WARNING: Not all variables in the list sex1-sex16 were found. WARNING: Not all variables in the list age1-age16 were found. WARNING: Not all variables in the list educ1-educ16 were found. WARNING: Not all variables in the list grad1-grad16 were found. WARNING: Not all variables in the list empact1-empact16 were found. WARNING: Not all variables in the list empind1-empind16 were found. WARNING: Not all variables in the list empocc1-empocc16 were found. WARNING: Not all variables in the list part1-part16 were found. WARNING: Not all variables in the list empsoc1-empsoc16 were found. WARNING: Not all variables in the list empsta1-empsta16 were found. WARNING: Not all variables in the list empsit1-empsit16 were found. WARNING: Not all variables in the list earner1-earner16 were found. WARNING: Not all variables in the list marry1-marry16 were found. WARNING: Not all variables in the list outpat1-outpat16 were found. WARNING: Not all variables in the list discrg1-discrg16 were found. WARNING: Not all variables in the list insnhi1-insnhi16 were found. WARNING: Not all variables in the list ins1si1-ins1si16 were found. WARNING: Not all variables in the list ins1ms1-ins1ms16 were found. WARNING: Not all variables in the list ins2si1-ins2si16 were found. WARNING: Not all variables in the list ins2ms1-ins2ms16 were found. NOTE: There were 13801 observations read from the data set ZH.NEW00. NOTE: The data set ZH.DATA00 has 13801 observations and 316 variables. NOTE: DATA statement used (Total process time): real time 4.92 seconds cpu time 1.75 seconds NOTE: There were 13801 observations read from the data set ZH.DATA00. NOTE: The data set ZH.PERSON00 has 49793 observations and 27 variables. NOTE: DATA statement used (Total process time): real time 1.39 seconds cpu time 0.52 seconds NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.05 seconds cpu time 0.01 seconds NOTE: The PROCEDURE CONTENTS printed pages 3-4. 111 %one(01); WARNING: Not all variables in the list person1-person16 were found. WARNING: Not all variables in the list relate1-relate16 were found. WARNING: Not all variables in the list sex1-sex16 were found. WARNING: Not all variables in the list age1-age16 were found. WARNING: Not all variables in the list educ1-educ16 were found. WARNING: Not all variables in the list grad1-grad16 were found. WARNING: Not all variables in the list empact1-empact16 were found. 5 The SAS System 23:50 Sunday, May 14, 2006 WARNING: Not all variables in the list empind1-empind16 were found. WARNING: Not all variables in the list empocc1-empocc16 were found. WARNING: Not all variables in the list part1-part16 were found. WARNING: Not all variables in the list empsoc1-empsoc16 were found. WARNING: Not all variables in the list empsta1-empsta16 were found. WARNING: Not all variables in the list empsit1-empsit16 were found. WARNING: Not all variables in the list earner1-earner16 were found. WARNING: Not all variables in the list marry1-marry16 were found. WARNING: Not all variables in the list outpat1-outpat16 were found. WARNING: Not all variables in the list discrg1-discrg16 were found. WARNING: Not all variables in the list insnhi1-insnhi16 were found. WARNING: Not all variables in the list ins1si1-ins1si16 were found. WARNING: Not all variables in the list ins1ms1-ins1ms16 were found. WARNING: Not all variables in the list ins2si1-ins2si16 were found. WARNING: Not all variables in the list ins2ms1-ins2ms16 were found. NOTE: There were 13601 observations read from the data set ZH.NEW01. NOTE: The data set ZH.DATA01 has 13601 observations and 338 variables. NOTE: DATA statement used (Total process time): real time 4.99 seconds cpu time 1.57 seconds NOTE: There were 13601 observations read from the data set ZH.DATA01. NOTE: The data set ZH.PERSON01 has 48403 observations and 27 variables. NOTE: DATA statement used (Total process time): real time 1.56 seconds cpu time 0.58 seconds NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.05 seconds cpu time 0.02 seconds NOTE: The PROCEDURE CONTENTS printed pages 5-6. 112 %one(02); NOTE: There were 13681 observations read from the data set ZH.NEW02. NOTE: The data set ZH.DATA02 has 13681 observations and 360 variables. NOTE: DATA statement used (Total process time): real time 5.15 seconds cpu time 1.70 seconds NOTE: There were 13681 observations read from the data set ZH.DATA02. NOTE: The data set ZH.PERSON02 has 49505 observations and 27 variables. NOTE: DATA statement used (Total process time): real time 1.47 seconds cpu time 0.47 seconds NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.06 seconds cpu time 0.01 seconds 6 The SAS System 23:50 Sunday, May 14, 2006 NOTE: The PROCEDURE CONTENTS printed pages 7-8. 113 %one(03); WARNING: Not all variables in the list person1-person16 were found. WARNING: Not all variables in the list relate1-relate16 were found. WARNING: Not all variables in the list sex1-sex16 were found. WARNING: Not all variables in the list age1-age16 were found. WARNING: Not all variables in the list educ1-educ16 were found. WARNING: Not all variables in the list grad1-grad16 were found. WARNING: Not all variables in the list empact1-empact16 were found. WARNING: Not all variables in the list empind1-empind16 were found. WARNING: Not all variables in the list empocc1-empocc16 were found. WARNING: Not all variables in the list part1-part16 were found. WARNING: Not all variables in the list empsoc1-empsoc16 were found. WARNING: Not all variables in the list empsta1-empsta16 were found. WARNING: Not all variables in the list empsit1-empsit16 were found. WARNING: Not all variables in the list earner1-earner16 were found. WARNING: Not all variables in the list marry1-marry16 were found. WARNING: Not all variables in the list outpat1-outpat16 were found. WARNING: Not all variables in the list discrg1-discrg16 were found. WARNING: Not all variables in the list insnhi1-insnhi16 were found. WARNING: Not all variables in the list ins1si1-ins1si16 were found. WARNING: Not all variables in the list ins1ms1-ins1ms16 were found. WARNING: Not all variables in the list ins2si1-ins2si16 were found. WARNING: Not all variables in the list ins2ms1-ins2ms16 were found. NOTE: There were 13681 observations read from the data set ZH.NEW03. NOTE: The data set ZH.DATA03 has 13681 observations and 316 variables. NOTE: DATA statement used (Total process time): real time 4.52 seconds cpu time 1.45 seconds NOTE: There were 13681 observations read from the data set ZH.DATA03. NOTE: The data set ZH.PERSON03 has 47959 observations and 27 variables. NOTE: DATA statement used (Total process time): real time 1.37 seconds cpu time 0.51 seconds NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.04 seconds cpu time 0.01 seconds NOTE: The PROCEDURE CONTENTS printed pages 9-10. 114 115 %include '~/nta/savastata.mac'; 2570 2571 %macro convert(aa); 2572 data person&aa; 2573 set zh.person&aa; 2574 %savastata(~/taiwan/fies/fiesdata 2574 ! /,replace); 2575 run; 7 The SAS System 23:50 Sunday, May 14, 2006 2576 %mend; 2577 %convert(99); NOTE: There were 49927 observations read from the data set ZH.PERSON99. NOTE: The data set WORK.PERSON99 has 49927 observations and 27 variables. NOTE: DATA statement used (Total process time): real time 0.74 seconds cpu time 0.19 seconds NOTE: Savastata has successfully saved the * Stata 8 Intercooled data file /home/brass/hdir0/ebenstei/taiwan/fies/fiesdata/person99.dta. * Stata reports that the dataset has 49927 observations and 27 variables. * NOTE: Savastata took less than a minute to run. * 2677 %convert(00); NOTE: There were 49793 observations read from the data set ZH.PERSON00. NOTE: The data set WORK.PERSON00 has 49793 observations and 27 variables. NOTE: DATA statement used (Total process time): real time 0.73 seconds cpu time 0.18 seconds NOTE: Savastata has successfully saved the * Stata 8 Intercooled data file /home/brass/hdir0/ebenstei/taiwan/fies/fiesdata/person00.dta. * Stata reports that the dataset has 49793 observations and 27 variables. * NOTE: Savastata took less than a minute to run. * 2777 %convert(01); NOTE: There were 48403 observations read from the data set ZH.PERSON01. NOTE: The data set WORK.PERSON01 has 48403 observations and 27 variables. NOTE: DATA statement used (Total process time): real time 0.70 seconds cpu time 0.23 seconds NOTE: Savastata has successfully saved the * Stata 8 Intercooled data file /home/brass/hdir0/ebenstei/taiwan/fies/fiesdata/person01.dta. * Stata reports that the dataset has 48403 observations and 27 variables. * NOTE: Savastata took less than a minute to run. * 2877 %convert(02); NOTE: There were 49505 observations read from the data set ZH.PERSON02. NOTE: The data set WORK.PERSON02 has 49505 observations and 27 variables. NOTE: DATA statement used (Total process time): 8 The SAS System 23:50 Sunday, May 14, 2006 real time 0.71 seconds cpu time 0.17 seconds NOTE: Savastata has successfully saved the * Stata 8 Intercooled data file /home/brass/hdir0/ebenstei/taiwan/fies/fiesdata/person02.dta. * Stata reports that the dataset has 49505 observations and 27 variables. * NOTE: Savastata took less than a minute to run. * 2977 %convert(03); NOTE: There were 47959 observations read from the data set ZH.PERSON03. NOTE: The data set WORK.PERSON03 has 47959 observations and 27 variables. NOTE: DATA statement used (Total process time): real time 0.70 seconds cpu time 0.11 seconds NOTE: Savastata has successfully saved the * Stata 8 Intercooled data file /home/brass/hdir0/ebenstei/taiwan/fies/fiesdata/person03.dta. * Stata reports that the dataset has 47959 observations and 27 variables. * NOTE: Savastata took less than a minute to run. * NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 1:11.69 cpu time 26.25 seconds