---------------------------------------------------------------------------------------------------------------------------------------- log: /disk/nber10/SCCS/morg/sources/test.log log type: text opened on: 15 Feb 2006, 13:33:29 . set memory 1000m (1024000k) . set more 1 . *primary family and child variables added 2000-04-20 by Jean Roth, jroth@nber.org . *Y2K compliance by Jean Roth, jroth@nber.org, 2001-01-15 . *Imputed highest grade completed, ihigrdc, added by Jean Roth, jroth@nber.org, 2003-01-20 . *Stata 8 compliance by Jean Roth, jroth@nber.org, 2003-02-28 . *matching variables added by Jean Roth, jroth@nber.org, 2003-02-12 . * run with nohup stata -b do annual2002 & to run in batch mode . do rw . . program rw 1. * grab the annual file . * keep data from the relevant month . * sort by revised weight merge variables . * merge using the revised weight monthly file, 'rwmonyy.dta' . * save the merged file as 'mon' . use /homes/data/morg/annual/rw/annual 2. keep if intmonth==`3' 3. quietly describe 4. display "`3' `2' obs " r(N) 5. local rwlist qstnum intmonth year occurnum 6. sort `rwlist' 7. merge `rwlist' using /homes/data/morg/annual/rw/rw`2'`1' 8. drop if _merge == 2 9. save /homes/data/morg/annual/rw/`2', replace 10. end . end of do-file . program define aef2 1. local dct_name "aef`3'.dbd" 2. local raw_name "../raw/morg`2'" 3. display "dct_name `dct_name'" 4. display "raw_name `raw_name'" 5. quietly infile using "`dct_name'" if age>15&age!=. , using("`raw_name'") clear 6. *quietly infile using "`dct_name'" if age>15&age!=. in 1/100 , using("`raw_name'") clear . *quietly infile using aef if age>15&age!=. . display "infile successful" 7. #delimit cr delimiter now cr . generate int year = `1' 8. *summarize . quietly describe 9. display "obs " r(N) 10. ** Revised Census 2000-based Weights. Impact employment and union variables . if inlist( `1', 2000 , 2001 , 2002 ) { 11. gen id = _n 12. local rwlist qstnum intmonth year occurnum 13. sort `rwlist' 14. quietly describe 15. display "total obs pre-revise `1' " r(N) 16. saveold /homes/data/morg/annual/rw/annual, replace 17. clear 18. rw `2' jan 1 19. rw `2' feb 2 20. rw `2' mar 3 21. rw `2' apr 4 22. rw `2' may 5 23. rw `2' jun 6 24. rw `2' jul 7 25. rw `2' aug 8 26. rw `2' sep 9 27. rw `2' oct 10 28. rw `2' nov 11 29. rw `2' dec 12 30. local monlist feb mar apr may jun jul aug sep oct nov dec 31. clear 32. display "using jan" 33. use /homes/data/morg/annual/rw/jan 34. foreach mon in `monlist' { 35. append using /home/data/morg/annual/rw/`mon' 36. } 37. quietly describe 38. display "total obs post-revise" r(N) 39. display "start renaming" 40. rename neio1icd ind02 41. rename ntio1ocd occ00 42. replace occ00 = . if occ00 < 0 43. rename class94 class94p 44. replace class94p = . if class94p<0 45. . rename neio1cow class94 46. rename earnwt earnwtp 47. rename nworwgt earnwt 48. rename weight weightp 49. rename nwsswgt weight 50. display "done renaming" 51. display "drop 2000" 52. if `1' == 2000 { 53. drop neerncov neernlab 54. } 55. display "rename 2001-2002" 56. if inlist( `1' , 2001 , 2002 ) { 57. rename unioncov unioncop 58. replace unioncop = . if unioncop < 0 59. rename neerncov unioncov 60. rename unionmme unionmep 61. replace unionmep = . if unionmep < 0 62. rename neernlab unionmme 63. } 64. sort id 65. drop id _merge 66. } 67. . * Miscellaneous (record keeping) variables . if `1' == 1994 { 68. replace hhid = hhid94 69. drop hhid94 70. } 71. if `1'== 1995 { 72. replace hhid = hhid94 if intmonth<9 73. drop hhid94 74. } 75. if inlist( `1', 1996 , 1997 ) { 76. drop hhid94 77. } 78. * Geography . display "Geography" 79. if `1'==2004 { 80. display "replace serial" 81. replace serial = serial04 if intmonth >= 5 82. replace hhnum = hhnum04 if intmonth >= 5 83. display "replace cmsacode" 84. replace cmsacode = . if intmonth >= 5 85. display "replace msafips" 86. replace msafips = . if intmonth >= 5 87. display "replace smsa93" 88. replace smsa93 = . if intmonth >= 5 89. display "replacing smsa04 in May 2004 and later" 90. replace smsa04 = . if smsa04<2 & intmonth >= 5 91. } 92. if `1' == 2003 { 93. display "dropping non-2003 variables" 94. drop cbsafips smsa04 serial04 hhnum04 hrhhid2 95. } 96. if `1'==2004 { 97. display "replacing pre-May 2004 variables" 98. replace cbsafips = . if intmonth <=4 99. replace smsa04 = . if intmonth <=4 100. replace hrhhid2 ="" if intmonth <=4 101. } 102. if `1' == 2004 { 103. drop serial04 hhnum04 104. } 105. if `1' >= 1996 & `1' <= 2003 | ( `1'==2004 & intmonth<=4 ) { 106. replace smsa93 = . if smsa93<2 107. } 108. display "smsasize = . if smsasize <=0" 109. capture replace smsasize = . if smsasize <=0 110. if `1' == 1995 { 111. replace smsastat = smsa995 if intmonth>8 112. replace icntcity = icntct94 if intmonth<9 113. replace centcity = centcitx if intmonth<9 114. replace smsa93 = . if intmonth>=9 & smsa93<2 115. replace smsa93 = . if intmonth<9 116. drop pmsarank 117. dis "gen smsa80" 118. generate smsa80 = smsasize 119. dis "rep smsa80" 120. replace smsa80 = . if intmonth >= 10 121. dis "replace county" 122. replace county = . if county < 0 123. dis "drop county" 124. if intmonth<9 { 125. drop county 126. } 127. } 128. display "inlisting 96 97" 129. if inlist( `1', 1996 , 1997 ) { 130. replace smsastat = smsa995 131. } 132. display "replace smsastat = . if smsastat==3 | smsastat<0" 133. replace smsastat = . if smsastat==3 | smsastat<0 134. if `1' == 1994 { 135. drop smsa93 136. replace centcity = centcitx 137. replace icntcity = icntct94 138. replace pmsarank = . if intmonth > 3 139. replace pmsarank = . if pmsarank <= 0 140. replace cmsarank = . if intmonth > 3 141. } 142. if inlist( `1', 1996 , 1997 ) { 143. drop pmsarank 144. } 145. if `1' >= 1994 & `1' <= 1997 { 146. drop centcitx icntct94 smsa995 147. } 148. if `1' >= 1994 { 149. replace hurespli =. if hurespli <0 150. replace peinusyr = . if peinusyr < 0 151. } 152. display "replace centcity = . if centcity==4 | centcity<=0" 153. replace centcity = . if centcity==4 | centcity<=0 154. if `1' >= 1986 & `1' < 1994 { 155. replace pmsarank = . if pmsarank<=0 156. } 157. if `1' >= 1995 & `1' <= 1997 { 158. drop cmsarank 159. } 160. if `1' >= 1986 { 161. replace icntcity = . if icntcity<=0 162. } 163. if `1' > 1984 & `1' < 1995 { 164. replace cmsarank = . if cmsarank<=0 165. } 166. if `1' >= 1989 { 167. replace msafips = . if msafips <=0 168. replace cmsacode = . if cmsacode<=0 169. } 170. if `1' == 1983 { 171. drop docc70 occ70 172. } 173. if `1' == 1985 { 174. replace smsarank = . if intmonth > 9 175. } 176. if `1' == 1984 { 177. display "drop icntcity pmsarank cmsarank" 178. drop icntcity pmsarank cmsarank 179. } 180. if `1' == 1985 & intmonth < 10 { 181. drop icntcity pmsarank cmsarank 182. } 183. if `1' == 1994 { 184. replace cmsarank = . if intmonth>3 185. } 186. display "replace smsasize=. if smsasize<=0" 187. **should line below be commented out??? . capture replace smsasize=. if smsasize<=0 188. if `1' < 1985 { 189. display "generate byte smsa70 = smsasize" 190. generate byte smsa70 = smsasize 191. } 192. if `1' > 1985 & `1' < 1995 { 193. generate byte smsa80 = smsasize 194. } 195. if `1' == 1985 { 196. generate byte smsa70 = smsasize if intmonth<10 197. } 198. if `1' == 1985 { 199. generate byte smsa80 = smsasize if intmonth>9 200. } 201. display "drop smsasize" 202. capture drop smsasize 203. if `1' > 1985 & `1' < 1989 { 204. drop smsarank 205. } 206. if `1' < 1983 { 207. display "drop unioncov unionmme occ80 ind80" 208. drop unioncov unionmme occ80 ind80 209. } 210. . * Demography . display "Demography" 211. if `1' > 1983 & `1' < 1994 { 212. replace ownchild = . if ownchild ==0 213. replace ownchild = ownchild - 1 214. generate int ch613=chldpres 215. generate int ch1417=chldpres 216. } 217. display "if `1' > 1983 & `1' < 1989 {" 218. if `1' > 1983 & `1' < 1989 { 219. generate int ch05= chldpres 220. recode ch05 (4 6/8 = 1) (0/3 5 = 0) 221. recode ch613 (3 5 7/8 = 1) (0/2 4 6 = 0) 222. recode ch1417 (2 5/6 8 =1) (0/1 3/4 7 = 0) 223. } 224. if `1' > 1988 & `1' < 1994 { 225. display "if `1' > 1988 & `1' < 1994 {" 226. generate int ch02 = chldpres 227. generate int ch35 = chldpres 228. recode ch02 (2 6/8 12/14 16 = 1) (0/1 3/5 9/11 15 = 0) 229. recode ch35 (3 6 9/10 12/13 15/16 = 1) (0/2 4/5 7/8 11 14 = 0) 230. recode ch613 (4 7 9 11/12 14/16 = 1) (0/3 5/6 8 10 13 = 0) 231. recode ch1417 (5 8 10/11 13/16 = 1) (0/4 6/7 9 12 = 0 ) 232. generate int ch05 = ch02 233. replace ch05 = ch35 if ch35 == 1 234. label variable ch02 "Children 0-2" 235. label variable ch35 "Children 3-5" 236. } 237. if `1' > 1983 & `1' < 1994 { 238. display "if `1' > 1983 & `1' < 1994 {" 239. label variable ch05 "Children 0-5" 240. label variable ch613 "Children 6-13" 241. label variable ch1417 "Children 6-17" 242. } 243. if `1' == 1998 { 244. drop ownchild chldpres 245. } 246. if `1' >= 1999 { 247. replace ownchild = . if ownchild < 0 248. replace chldpres = . if chldpres < 0 249. generate int ch02 = chldpres 250. generate int ch35 = chldpres 251. generate int ch613 = chldpres 252. generate int ch1417 = chldpres 253. recode ch02 (1 5/7 11/13 15 = 1) (0 2/4 8/10 14 = 0) 254. recode ch35 (2 5 8/9 11/12 14/15 = 1) (0/1 3/4 6/7 10 13 =0) 255. recode ch613 (3 6 8 10/11 13/15 = 1) (0/2 4/5 7 9 12 = 0) 256. recode ch1417 (4 7 9/10 12/15 = 1) (0/3 5/6 8 11 = 0) 257. generate int ch05 = ch02 258. replace ch05 = ch35 if ch35 == 1 259. } 260. . if `1' == 1999 { 261. replace ownchild = . if intmonth < 10 262. replace chldpres = . if intmonth < 10 263. replace ch613 = . if intmonth < 10 264. replace ch1417 = . if intmonth < 10 265. replace ch05 = . if intmonth < 10 266. replace ch02 = . if intmonth < 10 267. replace ch35 = . if intmonth < 10 268. } 269. if `1' > 1988 & `1' < 1992 { 270. drop grade92 271. } 272. if `1' < 1989 { 273. replace gradeat = gradeat - 1 274. replace marital = 7 if marital==5 275. } 276. if `1' > 1991 { 277. replace grade92 = . if grade92 < 0 278. } 279. if `1' >= 1998 { 280. replace ged = . if ged < 0 281. replace gedhigr = . if gedhigr < 0 282. replace yrcoll = . if yrcoll < 0 283. replace grprof = . if grprof < 0 284. replace gr6cor = . if gr6cor < 0 285. replace ms123 = . if ms123 < 0 286. generate double ihigrdc = . 287. ** Jaeger . label var ihigrdc "Imputed highest grade completed" 288. replace ihigrdc = 0 if grade92==31 289. replace ihigrdc = 2.5 if grade92==32 290. replace ihigrdc = 5.5 if grade92==33 291. replace ihigrdc = 7.5 if grade92==34 292. replace ihigrdc = 9 if grade92==35 293. replace ihigrdc =10 if grade92==36 294. replace ihigrdc =11 if grade92==37 295. replace ihigrdc =12 if grade92==38 296. replace ihigrdc = 0 if grade92==39 & ged==2 & gedhigr==1 297. replace ihigrdc = 2.5 if grade92==39 & ged==2 & gedhigr==2 298. replace ihigrdc = 5.5 if grade92==39 & ged==2 & gedhigr==3 299. replace ihigrdc = 7.5 if grade92==39 & ged==2 & gedhigr==4 300. replace ihigrdc = 9 if grade92==39 & ged==2 & gedhigr==5 301. replace ihigrdc = 10 if grade92==39 & ged==2 & gedhigr==6 302. replace ihigrdc = 11 if grade92==39 & ged==2 & gedhigr==7 303. replace ihigrdc = 12 if grade92==39 & ged==2 & gedhigr==8 304. replace ihigrdc = 12 if ged==1 305. replace ihigrdc = 12 if grade92>=40 & grade92<=42 & yrcoll==1 306. replace ihigrdc = 13 if grade92>=40 & grade92<=42 & yrcoll==2 307. replace ihigrdc = 14 if grade92>=40 & grade92<=42 & yrcoll==3 308. replace ihigrdc = 15 if grade92>=40 & grade92<=42 & yrcoll==4 309. replace ihigrdc = 16 if grade92>=40 & grade92<=42 & yrcoll==5 310. replace ihigrdc = 16 if grade92==43 & grprof==2 311. replace ihigrdc = 17 if grade92==43 & gr6cor==2 312. replace ihigrdc = 18 if grade92==43 & gr6cor==1 313. replace ihigrdc = 17 if grade92==44 & ms123==1 314. replace ihigrdc = 18 if grade92==44 & ms123>=2 & ms123<. 315. replace ihigrdc = 18 if grade92==45 | grade92==46 316. } 317. if inlist( `1', 1992 , 1993 ) { 318. drop gradecp gradeat 319. } 320. if `1' == 1995 { 321. replace relref94 = . if intmonth > 2 322. replace relref95 = . if intmonth < 3 323. } 324. if inlist( `1', 1996 , 1997 ) { 325. drop relref94 326. } 327. if `1' == 1994 { 328. drop relref95 329. } 330. if `1' >= 1994 { 331. replace penatvty = . if penatvty < 0 332. replace pemntvty = . if pemntvty < 0 333. replace pefntvty = . if pefntvty < 0 334. replace prcitshp = . if prcitshp < 0 335. replace prcitflg = . if prcitflg < 0 336. } 337. if `1' > 1989 { 338. replace ethnic = . if ethnic < 0 339. replace ethnic = . if ethnic >= 10 340. } 341. if `1' >= 1994 & ( `1' == 2005 & intmonth <= 7 ) { 342. replace veteran = . if veteran < 0 343. } 344. . * Employment . display "Employment" 345. if `1' >= 1994 & `1' <= 2002 { 346. replace occ80 = . if occ80 <0 347. replace ind80 = . if ind80 < 10 348. replace class94 = . if class94<0 349. } 350. if `1' >= 2000 { 351. replace occ00 = . if occ00 <0 352. replace ind02 = . if ind02 < 10 353. replace class94 = . if class94<0 354. } 355. #delimit ; delimiter now ; . ; . display "docc80" ; 356. if `1' >= 1983 & `1' <= 2002 { > display "generate int docc80=occ80;"; 357. generate int docc80=occ80; 358. display "recode docc80"; 359. recode docc80 (1/6=1) (7/22=2) (23/37=3) (44/59=4) (64/68=5) (69/83=6) (84/89=7) > (95/106=8) (113/154=9) (155/159=10) (178/179=11) (43 63 163/177 183/199=12) > (203/208=13) (213/225=14) (226/235=15) (243=16) (253/257=17) (258/259=18) > (263/278=19) (283/285=20) (303/307=21) (308/309=22) (313/315=23) (337/344=24) > (354/357=25) (316/336 345/353 359/389=26) (403/407=27) (413/427=28) > (433/444=29) (445/447=30) (448/455=31) (456/469=32) (503/549=33) (553/599=34) > (613/699=35) (703/779=36) (783/799=37) (803/814=38) (823/859=39) (869=40) > (875/883=41) (863/868 873 874 885/889=42) (473/476=43) (477/489=44) (494/499=45) > (905=46); 360. } ; 361. display "** The renaming is part of the Census reweighting ; " ; 362. if inlist( `1', 2000 , 2001 , 2002 ) { > *display "renaming docc80 docc80p " ; 363. *rename docc80 docc80p ; . } ; 364. display "docc00" ; 365. if `1' >= 2000 { > display "generate int docc00=occ00;"; 366. generate int docc00=occ00; 367. display "recode docc00"; 368. recode docc00 (10/430=1) (500/950=2) (1000/1240=3) (1300/1560=4) (1600/1960=5) > (2000/2060=6) (2100/2150=7) (2200/2550=8) (2600/2960=9) (3000/3540=10) (3600/3650=11) > (3700/3950=12) (4000/4160=13) (4200/4250=14) (4300/4650=15) (4700/4960=16) > (5000/5930=17) (6000/6130=18) (6200/6940=19) (7000/7620=20) (7700/8960=21) > (9000/9750=22) (9840=23); 369. } ; 370. display "dind"; 371. if `1'<= 1982 { > display "`1' <= 1982: creating dind from ind70"; 372. gen dind=ind70 ; 373. recode dind (18/19=1) (17=2) (47/57=3) (67/77=4) (107/109=5) (118=6) (119/138=7) > (139/149=8) (157/168 258=9) (169=10) (177/198=11) (199/209=12) (219 =13) > (227=14) (228/238=15) (239/257=16) (259=18) (268/298=19) (299=20) > (307/318=21) (319/327=22) (328/337=23) (338/339=24) (347/369=25) > (377/378=26) (379/387=27) (388/398=28) (407/429=29) (447/449=30) (467/479=31) > (507/588=32) (607/698=33) (707/709=34) (717/718=35) > (769=36) (727/748=37) (749/759=38) (777/798=39) (807/809=40) (838=41) > (828/837 839/848=42) (877/879=44) (857/868=43) (849 869 887/897= 45) > (027 028 = 46) (907/937=52) ; 374. } ; 375. if `1' <=1991 & `1' >=1983 { > display "replacing dind for `1': `1' <=1991 & `1' >=1983"; 376. gen dind=ind80; 377. recode > dind (12/29=1) (10/11=2) (40/50=3) (60=4) (230/241=5) (242=6) (250/262=7) > (270/280=8) (281/300=9) (301=10) (310/332=11) (340/350=12) > (351=13) (352=14) (360/370=15) (371/382=16) (390=17) (391/392=18) > (100/122=19) (130=20) (132/150=21) (151/152=22) (160/162=23) (171/172=24) > (180/192=25) (200/201=26) (210/212=27) (220/222=28) > (400/432=29) (440/442=30) (450/472=31) (500/571=32) (580/691=33) (700/710=34) > (711/712=35) (761=36) (721/750=37) (751/760=38) (762/791=39) (800/810=40) > (831=41) (812/830 832/840=42) (842/860=43) (861/871=44) (841 872/893=45) > (30/32=46) (900/932=52) (991=51); 378. } ; 379. if `1' >= 1992 & `1' <= 2002 { > display "replacing dind for `1': `1' >= 1992 & `1' <= 2002 "; 380. gen dind=ind80; 381. recode > dind (12/30=1) (10/11=2) (40/50=3) (60=4) (230/241=5) (242=6) (250/262=7) > (270/280=8) (281/300=9) (301=10) (310/332=11) (340/350=12) > (351=13) (352=14) (360/370=15) (371/382=16) (390=17) (391/392=18) > (100/122=19) (130=20) (132/150=21) (151/152=22) (160/162=23) (171/172=24) > (180/192=25) (200/201=26) (210/212=27) (220/222=28) > (400/432=29) (440/442=30) (450/472=31) (500/571=32) (580/691=33) > (700/710=34) (711/712=35) (761=36) (721/750=37) (751/760=38) (762/791=39) > (800/810=40) (831=41) (812/830 832/840=42) (842/860=43) > (861/871=44) (841 872/893 =45) > (032 031 =46) > (910 922 932 900 901 921 930 931 =52) > (991=51) ; 382. }; 383. if `1' >= 2000 { > display "replacing dind for `1' >= 2000 " ; 384. gen dind02 = ind02; 385. recode > dind02 (170/180 290=1) (190/280=2) (370/490=3) (770=4) (2470/2590=5) > (2670/2990=6) (3070/3290=7) (3360/3390=8) (3470 3490=9) (3570/3690=10) > (3770/3870=11) (3890=12) (3960/3990=13) (1070/1290=14) (1370 1390=15) > (1470/1790=16) (1870/1990=17) (2070 2090=18) (2170/2290=19) (2370/2390=20) > (4070/4590=21) (4670/5790=22) (6070/6390=23) (570/690=24) (6470/6490=25) > (6570 6590=26) (6670=27) (6675=28) (6680 6690=29) (6692 6695=30) > (6770 6780=31) (6870/6970=32) (6990=33) (7070=34) (7080/7190=35) > (7270/7490=36) (7570=37) (7580/7780=38) (7790=39) (7860/7890=40) > (8190=41) (7970/8180 8270 8290=42) (8370/8470=43) (8560/8590=44) (8660 8670=45) > (8680 8690=46) (8770/8890=47) (8970/9090=48) (9160/9190=49) (9290=50) > (9370/9590=51) (9890=52) ; 386. } ; 387. #delimit cr delimiter now cr . **Wages (If earnings are 0, then wage rate is missing, not zero). . display "Wages" 388. replace paidhr = . if paidhr <=0 389. replace paidhre = . if paidhre <=0 390. replace earnhr = . if earnhr <=0 391. replace earnhre = . if earnhre <=0 392. replace earnwke = . if earnwke < 0 393. if `1' < 1989 { 394. replace eligible = 2 if eligible == . 395. } 396. if `1' >= 1989 { 397. replace eligible = 2 if eligible <= 0 398. } 399. if `1' < 1989 { 400. replace I25a = 0 if I25a ==. 401. replace I25b = 0 if I25b ==. 402. replace I25c = 0 if I25c ==. 403. replace I25d = 0 if I25d ==. 404. } 405. if `1' >= 1994 { 406. replace I25a = 0 if I25a <= 3 407. replace I25b = 0 if I25b <= 3 408. *replace I25a = . if I25a < 0 . *replace I25b = . if I25b < 0 . replace earnhre = . if earnhre ==1 409. replace uhourse = . if lfsr94 >2 | lfsr94 <1 410. replace lfsr94 = . if lfsr94 < 0 411. } 412. if `1' >= 1996 { 413. replace I25c = . if I25c < 0 414. replace I25d = . if I25d < 0 415. } 416. if `1' == 1995 { 417. replace I25c = . if I25c < 0 418. replace I25d = . if I25d < 0 419. replace I25c = . if intmonth < 9 420. replace I25d = . if intmonth < 9 421. } 422. if `1' == 1994 { 423. drop I25c I25d 424. } 425. ** Hours, Unions . display "Hours, Unions" 426. if `1' >= 1994 { 427. replace reason94 = . if reason94< 0 428. replace absent94 = . if absent94< 0 429. replace studftpt = . if studftpt< 0 430. replace schenr = . if schenr < 0 431. replace schlvl = . if schlvl < 0 432. replace ftpt94 = . if ftpt94 < 0 433. replace hourslw = . if hourslw < 0 434. replace hourslw = 99 if hourslw >99 & hourslw != . 435. replace uhourse = . if uhourse < 0 436. replace why3594 = . if why3594 < 0 437. replace unionmme = . if unionmme< 0 438. replace unioncov = . if unioncov< 0 439. } 440. . ** Save and exit . compress 441. saveold /home/data/morg/annual/morg`2',replace 442. summarize 443. clear 444. *! /usr/bin/rm -f aef.dct /tmp/aef.raw . *! /bin/rm -f aef.dct /tmp/aef.raw . ! /usr/bin/chmod a+r /home/data/morg/annual/morg`2'.dta 445. ! /bin/chmod a+r /home/data/morg/annual/morg`2'.dta 446. ! /usr/bin/chmod g+w /home/data/morg/annual/morg`2'.dta 447. ! /bin/chmod g+w /home/data/morg/annual/morg`2'.dta 448. ! /usr/bin/chgrp web /home/data/morg/annual/morg`2'.dta 449. ! /bin/chgrp web /home/data/morg/annual/morg`2'.dta 450. end . . *Each block of commands does one year of the data. The data must be . *decompressed, and possibly have dashes converted to blanks. . *Then a dictionary for the particular year is prepared by . *concatenating a one line header (with the file name) to a generic . *dictionary body that covers several years of data that used the . *same format. . *Lastly, the data is read, modified, summarized and saved. . . *aef2 1979 79 79_83 . *aef2 1980 80 79_83 . *aef2 1981 81 79_83 . *aef2 1982 82 79_83 . *aef2 1983 83 79_83 . *aef2 1984 84 84_88 . *aef2 1985 85 84_88 . *aef2 1986 86 84_88 . *aef2 1987 87 84_88 . *aef2 1988 88 84_88 . *aef2 1989 89 89_93 . *aef2 1990 90 89_93 . *aef2 1991 91 89_93 . *aef2 1992 92 89_93 . *aef2 1993 93 89_93 . *aef2 1994 94 94_97 . *aef2 1995 95 94_97 . *aef2 1996 96 94_97 . *aef2 1997 97 94_97 . *aef2 1998 98 98_02 . *aef2 1999 99 98_02 . *aef2 2000 00 98_02 . *aef2 2001 01 98_02 . *aef2 2002 02 98_02 . *aef2 2003 03 03 . *aef2 2004 04 03 . aef2 2005 05 03 dct_name aef03.dbd raw_name ../raw/morg05 file ../raw/morg05.raw not found r(601); end of do-file r(601); . exit