data two; set r20.current; CALL SYMPUT ('E100000 ','YEMP_100000_01-YEMP_100000_05 E06-E10'); CALL SYMPUT ('E100100 ','YEMP_100100_01-YEMP_100100_07 E08 YEMP_100100_09 E10'); CALL SYMPUT ('E10020502 ','YEMP_100205_01_02 YEMP_100205_02_02 YEMP_100205_03_02 YEMP_100205_04_02 YEMP_100205_05_02 YEMP_100205_06_02 YEMP_100205_07_02 YEMP_100205_08_02 E09-E10'); CALL SYMPUT ('E10020503 ','YEMP_100205_01_03 YEMP_100205_02_03 YEMP_100205_03_03 YEMP_100205_04_03 YEMP_100205_05_03 YEMP_100205_06_03 E07-E10'); CALL SYMPUT ('E10020504 ','YEMP_100205_01_04 YEMP_100205_02_04 YEMP_100205_03_04 YEMP_100205_04_04 YEMP_100205_05_04 YEMP_100205_06_04 E07-E10'); CALL SYMPUT ('E10020505 ','YEMP_100205_01_05 YEMP_100205_02_05 YEMP_100205_03_05 E04-E10'); CALL SYMPUT ('E10020506 ','YEMP_100205_01_06 YEMP_100205_02_06 YEMP_100205_03_06 YEMP_100205_04_06 E05-E10'); CALL SYMPUT ('E100214AAA02 ','YEMP_100214AAA_01_02 YEMP_100214AAA_02_02 YEMP_100214AAA_03_02 E04 YEMP_100214AAA_05_02 E06-E10'); CALL SYMPUT ('E100214AAA03 ','YEMP_100214AAA_01_03 YEMP_100214AAA_02_03 E03-E10'); CALL SYMPUT ('E100214AAA04 ','YEMP_100214AAA_01_04 YEMP_100214AAA_02_04 E03-E10'); CALL SYMPUT ('E100214AAA06 ','YEMP_100214AAA_01_06 E02-E10'); CALL SYMPUT ('E100214AAB02 ','YEMP_100214AAB_01_02 YEMP_100214AAB_02_02 YEMP_100214AAB_03_02 E04 YEMP_100214AAB_05_02 E06-E10'); CALL SYMPUT ('E100214AAB03 ','YEMP_100214AAB_01_03 YEMP_100214AAB_02_03 E03-E10'); CALL SYMPUT ('E100214AAB04 ','YEMP_100214AAB_01_04 YEMP_100214AAB_02_04 E03-E10'); CALL SYMPUT ('E100214AAB06 ','YEMP_100214AAB_01_06 E02-E10'); CALL SYMPUT ('E100214B02 ','YEMP_100214B_01_02 YEMP_100214B_02_02 YEMP_100214B_03_02 YEMP_100214B_04_02 E05 YEMP_100214B_06_02 E07-E10'); CALL SYMPUT ('E100214B03 ','YEMP_100214B_01_03 YEMP_100214B_02_03 E03-E10'); CALL SYMPUT ('E100214B04 ','YEMP_100214B_01_04 E02-E10'); CALL SYMPUT ('E100214B05 ','YEMP_100214B_01_05 E02-E10'); CALL SYMPUT ('E100214B06 ','YEMP_100214B_01_06 E02-E10'); CALL SYMPUT ('E10021402 ','YEMP_100214_01_02 YEMP_100214_02_02 YEMP_100214_03_02 YEMP_100214_04_02 YEMP_100214_05_02 YEMP_100214_06_02 YEMP_100214_07_02 YEMP_100214_08_02 E09-E10'); CALL SYMPUT ('E10021403 ','YEMP_100214_01_03 YEMP_100214_02_03 YEMP_100214_03_03 YEMP_100214_04_03 YEMP_100214_05_03 YEMP_100214_06_03 E07-E10'); CALL SYMPUT ('E10021404 ','YEMP_100214_01_04 YEMP_100214_02_04 YEMP_100214_03_04 YEMP_100214_04_04 YEMP_100214_05_04 YEMP_100214_06_04 E07-E10'); CALL SYMPUT ('E10021405 ','YEMP_100214_01_05 YEMP_100214_02_05 YEMP_100214_03_05 E04-E10'); CALL SYMPUT ('E10021406 ','YEMP_100214_01_06 YEMP_100214_02_06 YEMP_100214_03_06 YEMP_100214_04_06 E05-E10'); CALL SYMPUT ('E101500 ','YEMP_101500_01-YEMP_101500_10'); CALL SYMPUT ('E10220001D ','YEMP_102200_01_01_D YEMP_102200_02_01_D YEMP_102200_03_01_D YEMP_102200_04_01_D YEMP_102200_05_01_D YEMP_102200_06_01_D YEMP_102200_07_01_D E08-E10'); CALL SYMPUT ('E10220001M ','YEMP_102200_01_01_M YEMP_102200_02_01_M YEMP_102200_03_01_M YEMP_102200_04_01_M YEMP_102200_05_01_M YEMP_102200_06_01_M YEMP_102200_07_01_M E08-E10'); CALL SYMPUT ('E10220001Y ','YEMP_102200_01_01_Y YEMP_102200_02_01_Y YEMP_102200_03_01_Y YEMP_102200_04_01_Y YEMP_102200_05_01_Y YEMP_102200_06_01_Y YEMP_102200_07_01_Y E08-E10'); CALL SYMPUT ('E10240002D ','YEMP_102400_01_02_D YEMP_102400_02_02_D YEMP_102400_03_02_D E04-E10'); CALL SYMPUT ('E10240002M ','YEMP_102400_01_02_M YEMP_102400_02_02_M YEMP_102400_03_02_M E04-E10'); CALL SYMPUT ('E10240002Y ','YEMP_102400_01_02_Y YEMP_102400_02_02_Y YEMP_102400_03_02_Y E04-E10'); CALL SYMPUT ('E10240003D ','YEMP_102400_01_03_D YEMP_102400_02_03_D YEMP_102400_03_03_D E04-E10'); CALL SYMPUT ('E10240003M ','YEMP_102400_01_03_M YEMP_102400_02_03_M YEMP_102400_03_03_M E04-E10'); CALL SYMPUT ('E10240003Y ','YEMP_102400_01_03_Y YEMP_102400_02_03_Y YEMP_102400_03_03_Y E04-E10'); CALL SYMPUT ('E10240004D ','YEMP_102400_01_04_D YEMP_102400_02_04_D YEMP_102400_03_04_D E04-E10'); CALL SYMPUT ('E10240004M ','YEMP_102400_01_04_M YEMP_102400_02_04_M YEMP_102400_03_04_M E04-E10'); CALL SYMPUT ('E10240004Y ','YEMP_102400_01_04_Y YEMP_102400_02_04_Y YEMP_102400_03_04_Y E04-E10'); CALL SYMPUT ('E10240005D ','YEMP_102400_01_05_D YEMP_102400_02_05_D YEMP_102400_03_05_D E04-E10'); CALL SYMPUT ('E10240005M ','YEMP_102400_01_05_M YEMP_102400_02_05_M YEMP_102400_03_05_M E04-E10'); CALL SYMPUT ('E10240005Y ','YEMP_102400_01_05_Y YEMP_102400_02_05_Y YEMP_102400_03_05_Y E04-E10'); CALL SYMPUT ('E10240006D ','YEMP_102400_01_06_D E02 YEMP_102400_03_06_D E04-E10'); CALL SYMPUT ('E10240006M ','YEMP_102400_01_06_M E02 YEMP_102400_03_06_M E04-E10'); CALL SYMPUT ('E10240006Y ','YEMP_102400_01_06_Y E02 YEMP_102400_03_06_Y E04-E10'); CALL SYMPUT ('E10240007D ','YEMP_102400_01_07_D E02-E10'); CALL SYMPUT ('E10240007M ','YEMP_102400_01_07_M E02-E10'); CALL SYMPUT ('E10240007Y ','YEMP_102400_01_07_Y E02-E10'); CALL SYMPUT ('E10240008D ','YEMP_102400_01_08_D E02-E10'); CALL SYMPUT ('E10240008M ','YEMP_102400_01_08_M E02-E10'); CALL SYMPUT ('E10240008Y ','YEMP_102400_01_08_Y E02-E10'); CALL SYMPUT ('E10240009D ','YEMP_102400_01_09_D E02-E10'); CALL SYMPUT ('E10240009M ','YEMP_102400_01_09_M E02-E10'); CALL SYMPUT ('E10240009Y ','YEMP_102400_01_09_Y E02-E10'); CALL SYMPUT ('E10270001D ','YEMP_102700_01_01_D YEMP_102700_02_01_D YEMP_102700_03_01_D YEMP_102700_04_01_D YEMP_102700_05_01_D YEMP_102700_06_01_D YEMP_102700_07_01_D E08-E10'); CALL SYMPUT ('E10270001M ','YEMP_102700_01_01_M YEMP_102700_02_01_M YEMP_102700_03_01_M YEMP_102700_04_01_M YEMP_102700_05_01_M YEMP_102700_06_01_M YEMP_102700_07_01_M E08-E10'); CALL SYMPUT ('E10270001Y ','YEMP_102700_01_01_Y YEMP_102700_02_01_Y YEMP_102700_03_01_Y YEMP_102700_04_01_Y YEMP_102700_05_01_Y YEMP_102700_06_01_Y YEMP_102700_07_01_Y E08-E10'); CALL SYMPUT ('E10270002D ','YEMP_102700_01_02_D YEMP_102700_02_02_D YEMP_102700_03_02_D E04-E10'); CALL SYMPUT ('E10270002M ','YEMP_102700_01_02_M YEMP_102700_02_02_M YEMP_102700_03_02_M E04-E10'); CALL SYMPUT ('E10270002Y ','YEMP_102700_01_02_Y YEMP_102700_02_02_Y YEMP_102700_03_02_Y E04-E10'); CALL SYMPUT ('E10270003D ','YEMP_102700_01_03_D YEMP_102700_02_03_D YEMP_102700_03_03_D E04-E10'); CALL SYMPUT ('E10270003M ','YEMP_102700_01_03_M YEMP_102700_02_03_M YEMP_102700_03_03_M E04-E10'); CALL SYMPUT ('E10270003Y ','YEMP_102700_01_03_Y YEMP_102700_02_03_Y YEMP_102700_03_03_Y E04-E10'); CALL SYMPUT ('E10270004D ','YEMP_102700_01_04_D YEMP_102700_02_04_D YEMP_102700_03_04_D E04-E10'); CALL SYMPUT ('E10270004M ','YEMP_102700_01_04_M YEMP_102700_02_04_M YEMP_102700_03_04_M E04-E10'); CALL SYMPUT ('E10270004Y ','YEMP_102700_01_04_Y YEMP_102700_02_04_Y YEMP_102700_03_04_Y E04-E10'); CALL SYMPUT ('E10270005D ','YEMP_102700_01_05_D YEMP_102700_02_05_D YEMP_102700_03_05_D E04-E10'); CALL SYMPUT ('E10270005M ','YEMP_102700_01_05_M YEMP_102700_02_05_M YEMP_102700_03_05_M E04-E10'); CALL SYMPUT ('E10270005Y ','YEMP_102700_01_05_Y YEMP_102700_02_05_Y YEMP_102700_03_05_Y E04-E10'); CALL SYMPUT ('E10270006D ','YEMP_102700_01_06_D E02 YEMP_102700_03_06_D E04-E10'); CALL SYMPUT ('E10270006M ','YEMP_102700_01_06_M E02 YEMP_102700_03_06_M E04-E10'); CALL SYMPUT ('E10270006Y ','YEMP_102700_01_06_Y E02 YEMP_102700_03_06_Y E04-E10'); CALL SYMPUT ('E10270007D ','YEMP_102700_01_07_D E02-E10'); CALL SYMPUT ('E10270007M ','YEMP_102700_01_07_M E02-E10'); CALL SYMPUT ('E10270007Y ','YEMP_102700_01_07_Y E02-E10'); CALL SYMPUT ('E10270008D ','YEMP_102700_01_08_D E02-E10'); CALL SYMPUT ('E10270008M ','YEMP_102700_01_08_M E02-E10'); CALL SYMPUT ('E10270008Y ','YEMP_102700_01_08_Y E02-E10'); CALL SYMPUT ('E10270009D ','YEMP_102700_01_09_D E02-E10'); CALL SYMPUT ('E10270009M ','YEMP_102700_01_09_M E02-E10'); CALL SYMPUT ('E10270009Y ','YEMP_102700_01_09_Y E02-E10'); CALL SYMPUT ('E103200 ', 'YEMP_103200_01-YEMP_103200_07 E08-E10'); CALL SYMPUT ('E10370001 ','YEMP_103700_01_01 YEMP_103700_02_01 YEMP_103700_03_01 YEMP_103700_04_01 YEMP_103700_05_01 YEMP_103700_06_01 YEMP_103700_07_01 E08-E10'); CALL SYMPUT ('E10370002 ','YEMP_103700_01_02 YEMP_103700_02_02 YEMP_103700_03_02 E04-E10'); CALL SYMPUT ('E10370003 ','YEMP_103700_01_03 YEMP_103700_02_03 YEMP_103700_03_03 E04-E10'); CALL SYMPUT ('E10370004 ','YEMP_103700_01_04 YEMP_103700_02_04 YEMP_103700_03_04 E04-E10'); CALL SYMPUT ('E10370005 ','YEMP_103700_01_05 YEMP_103700_02_05 YEMP_103700_03_05 E04-E10'); CALL SYMPUT ('E10370006 ','YEMP_103700_01_06 E02 YEMP_103700_03_06 E04-E10'); CALL SYMPUT ('E10370007 ','YEMP_103700_01_07 E02-E10'); CALL SYMPUT ('E10370008 ','YEMP_103700_01_08 E02-E10'); CALL SYMPUT ('E10370009 ','YEMP_103700_01_09 E02-E10'); CALL SYMPUT ('E10540001 ', 'YEMP_105400_01_01 YEMP_105400_02_01 YEMP_105400_03_01 YEMP_105400_04_01 E05-E10'); CALL SYMPUT ('E10540002 ', 'YEMP_105400_01_02 YEMP_105400_02_02 E03-E10'); CALL SYMPUT ('E10540003 ', 'E01 YEMP_105400_02_03 E03-E10'); CALL SYMPUT ('E105902 ', 'YEMP_105902_01-YEMP_105902_06 E07-E10'); CALL SYMPUT ('E10591201D ','YEMP_105912_01_01_D YEMP_105912_02_01_D YEMP_105912_03_01_D YEMP_105912_04_01_D E05-E10'); CALL SYMPUT ('E10591201M ','YEMP_105912_01_01_M YEMP_105912_02_01_M YEMP_105912_03_01_M YEMP_105912_04_01_M E05-E10'); CALL SYMPUT ('E10591201Y ','YEMP_105912_01_01_Y YEMP_105912_02_01_Y YEMP_105912_03_01_Y YEMP_105912_04_01_Y E05-E10'); CALL SYMPUT ('E10591402D ','YEMP_105914_01_02_D YEMP_105914_02_02_D YEMP_105914_03_02_D E04-E10'); CALL SYMPUT ('E10591402M ','YEMP_105914_01_02_M YEMP_105914_02_02_M YEMP_105914_03_02_M E04-E10'); CALL SYMPUT ('E10591402Y ','YEMP_105914_01_02_Y YEMP_105914_02_02_Y YEMP_105914_03_02_Y E04-E10'); CALL SYMPUT ('E10591403D ','YEMP_105914_01_03_D YEMP_105914_02_03_D E03-E10'); CALL SYMPUT ('E10591403M ','YEMP_105914_01_03_M YEMP_105914_02_03_M E03-E10'); CALL SYMPUT ('E10591403Y ','YEMP_105914_01_03_Y YEMP_105914_02_03_Y E03-E10'); CALL SYMPUT ('E10591404D ','YEMP_105914_01_04_D YEMP_105914_02_04_D E03-E10'); CALL SYMPUT ('E10591404M ','YEMP_105914_01_04_M YEMP_105914_02_04_M E03-E10'); CALL SYMPUT ('E10591404Y ','YEMP_105914_01_04_Y YEMP_105914_02_04_Y E03-E10'); CALL SYMPUT ('E10591405D ','YEMP_105914_01_05_D YEMP_105914_02_05_D E03-E10'); CALL SYMPUT ('E10591405M ','YEMP_105914_01_05_M YEMP_105914_02_05_M E03-E10'); CALL SYMPUT ('E10591405Y ','YEMP_105914_01_05_Y YEMP_105914_02_05_Y E03-E10'); CALL SYMPUT ('E10591406D ','YEMP_105914_01_06_D YEMP_105914_02_06_D E02-E10'); CALL SYMPUT ('E10591406M ','YEMP_105914_01_06_M YEMP_105914_02_06_M E02-E10'); CALL SYMPUT ('E10591406Y ','YEMP_105914_01_06_Y YEMP_105914_02_06_Y E02-E10'); CALL SYMPUT ('E10591407D ','YEMP_105914_01_07_D E02-E10'); CALL SYMPUT ('E10591407M ','YEMP_105914_01_07_M E02-E10'); CALL SYMPUT ('E10591407Y ','YEMP_105914_01_07_Y E02-E10'); CALL SYMPUT ('E10591408D ','YEMP_105914_01_08_D E02-E10'); CALL SYMPUT ('E10591408M ','YEMP_105914_01_08_M E02-E10'); CALL SYMPUT ('E10591408Y ','YEMP_105914_01_08_Y E02-E10'); CALL SYMPUT ('E10591409D ','YEMP_105914_01_09_D E02-E10'); CALL SYMPUT ('E10591409M ','YEMP_105914_01_09_M E02-E10'); CALL SYMPUT ('E10591409Y ','YEMP_105914_01_09_Y E02-E10'); CALL SYMPUT ('E10591410D ','YEMP_105914_01_10_D E02-E10'); CALL SYMPUT ('E10591410M ','YEMP_105914_01_10_M E02-E10'); CALL SYMPUT ('E10591410Y ','YEMP_105914_01_10_Y E02-E10'); CALL SYMPUT ('E10591411D ','YEMP_105914_01_11_D E02-E10'); CALL SYMPUT ('E10591411M ','YEMP_105914_01_11_M E02-E10'); CALL SYMPUT ('E10591411Y ','YEMP_105914_01_11_Y E02-E10'); CALL SYMPUT ('E10591412D ','YEMP_105914_01_12_D E02-E10'); CALL SYMPUT ('E10591412M ','YEMP_105914_01_12_M E02-E10'); CALL SYMPUT ('E10591412Y ','YEMP_105914_01_12_Y E02-E10'); CALL SYMPUT ('E10591413D ','YEMP_105914_01_13_D E02-E10'); CALL SYMPUT ('E10591413M ','YEMP_105914_01_13_M E02-E10'); CALL SYMPUT ('E10591413Y ','YEMP_105914_01_13_Y E02-E10'); CALL SYMPUT ('E10591414D ','YEMP_105914_01_14_D E02-E10'); CALL SYMPUT ('E10591414M ','YEMP_105914_01_14_M E02-E10'); CALL SYMPUT ('E10591414Y ','YEMP_105914_01_14_Y E02-E10'); CALL SYMPUT ('E10591415D ','YEMP_105914_01_15_D E02-E10'); CALL SYMPUT ('E10591415M ','YEMP_105914_01_15_M E02-E10'); CALL SYMPUT ('E10591415Y ','YEMP_105914_01_15_Y E02-E10'); CALL SYMPUT ('E10591416D ','YEMP_105914_01_16_D E02-E10'); CALL SYMPUT ('E10591416M ','YEMP_105914_01_16_M E02-E10'); CALL SYMPUT ('E10591416Y ','YEMP_105914_01_16_Y E02-E10'); CALL SYMPUT ('E10591417D ','YEMP_105914_01_17_D E02-E10'); CALL SYMPUT ('E10591417M ','YEMP_105914_01_17_M E02-E10'); CALL SYMPUT ('E10591417Y ','YEMP_105914_01_17_Y E02-E10'); CALL SYMPUT ('E10591418D ','YEMP_105914_01_18_D E02-E10'); CALL SYMPUT ('E10591418M ','YEMP_105914_01_18_M E02-E10'); CALL SYMPUT ('E10591418Y ','YEMP_105914_01_18_Y E02-E10'); CALL SYMPUT ('E10591419D ','YEMP_105914_01_19_D E02-E10'); CALL SYMPUT ('E10591419M ','YEMP_105914_01_19_M E02-E10'); CALL SYMPUT ('E10591419Y ','YEMP_105914_01_19_Y E02-E10'); CALL SYMPUT ('E10591420D ','YEMP_105914_01_20_D E02-E10'); CALL SYMPUT ('E10591420M ','YEMP_105914_01_20_M E02-E10'); CALL SYMPUT ('E10591420Y ','YEMP_105914_01_20_Y E02-E10'); CALL SYMPUT ('E10591421D ','YEMP_105914_01_21_D E02-E10'); CALL SYMPUT ('E10591421M ','YEMP_105914_01_21_M E02-E10'); CALL SYMPUT ('E10591421Y ','YEMP_105914_01_21_Y E02-E10'); CALL SYMPUT ('E10591601D ','YEMP_105916_01_01_D YEMP_105916_02_01_D YEMP_105916_03_01_D YEMP_105916_04_01_D E05-E10'); CALL SYMPUT ('E10591601M ','YEMP_105916_01_01_M YEMP_105916_02_01_M YEMP_105916_03_01_M YEMP_105916_04_01_M E05-E10'); CALL SYMPUT ('E10591601Y ','YEMP_105916_01_01_Y YEMP_105916_02_01_Y YEMP_105916_03_01_Y YEMP_105916_04_01_Y E05-E10'); CALL SYMPUT ('E10591602D ','YEMP_105916_01_02_D YEMP_105916_02_02_D YEMP_105916_03_02_D E04-E10'); CALL SYMPUT ('E10591602M ','YEMP_105916_01_02_M YEMP_105916_02_02_M YEMP_105916_03_02_M E04-E10'); CALL SYMPUT ('E10591602Y ','YEMP_105916_01_02_Y YEMP_105916_02_02_Y YEMP_105916_03_02_Y E04-E10'); CALL SYMPUT ('E10591603D ','YEMP_105916_01_03_D YEMP_105916_02_03_D E03-E10'); CALL SYMPUT ('E10591603M ','YEMP_105916_01_03_M YEMP_105916_02_03_M E03-E10'); CALL SYMPUT ('E10591603Y ','YEMP_105916_01_03_Y YEMP_105916_02_03_Y E03-E10'); CALL SYMPUT ('E10591604D ','YEMP_105916_01_04_D YEMP_105916_02_04_D E03-E10'); CALL SYMPUT ('E10591604M ','YEMP_105916_01_04_M YEMP_105916_02_04_M E03-E10'); CALL SYMPUT ('E10591604Y ','YEMP_105916_01_04_Y YEMP_105916_02_04_Y E03-E10'); CALL SYMPUT ('E10591605D ','YEMP_105916_01_05_D YEMP_105916_02_05_D E03-E10'); CALL SYMPUT ('E10591605M ','YEMP_105916_01_05_M YEMP_105916_02_05_M E03-E10'); CALL SYMPUT ('E10591605Y ','YEMP_105916_01_05_Y YEMP_105916_02_05_Y E03-E10'); CALL SYMPUT ('E10591606D ','YEMP_105916_01_06_D YEMP_105916_02_06_D E02-E10'); CALL SYMPUT ('E10591606M ','YEMP_105916_01_06_M YEMP_105916_02_06_M E02-E10'); CALL SYMPUT ('E10591606Y ','YEMP_105916_01_06_Y YEMP_105916_02_06_Y E02-E10'); CALL SYMPUT ('E10591607D ','YEMP_105916_01_07_D E02-E10'); CALL SYMPUT ('E10591607M ','YEMP_105916_01_07_M E02-E10'); CALL SYMPUT ('E10591607Y ','YEMP_105916_01_07_Y E02-E10'); CALL SYMPUT ('E10591608D ','YEMP_105916_01_08_D E02-E10'); CALL SYMPUT ('E10591608M ','YEMP_105916_01_08_M E02-E10'); CALL SYMPUT ('E10591608Y ','YEMP_105916_01_08_Y E02-E10'); CALL SYMPUT ('E10591609D ','YEMP_105916_01_09_D E02-E10'); CALL SYMPUT ('E10591609M ','YEMP_105916_01_09_M E02-E10'); CALL SYMPUT ('E10591609Y ','YEMP_105916_01_09_Y E02-E10'); CALL SYMPUT ('E10591610D ','YEMP_105916_01_10_D E02-E10'); CALL SYMPUT ('E10591610M ','YEMP_105916_01_10_M E02-E10'); CALL SYMPUT ('E10591610Y ','YEMP_105916_01_10_Y E02-E10'); CALL SYMPUT ('E10591611D ','YEMP_105916_01_11_D E02-E10'); CALL SYMPUT ('E10591611M ','YEMP_105916_01_11_M E02-E10'); CALL SYMPUT ('E10591611Y ','YEMP_105916_01_11_Y E02-E10'); CALL SYMPUT ('E10591612D ','YEMP_105916_01_12_D E02-E10'); CALL SYMPUT ('E10591612M ','YEMP_105916_01_12_M E02-E10'); CALL SYMPUT ('E10591612Y ','YEMP_105916_01_12_Y E02-E10'); CALL SYMPUT ('E10591613D ','YEMP_105916_01_13_D E02-E10'); CALL SYMPUT ('E10591613M ','YEMP_105916_01_13_M E02-E10'); CALL SYMPUT ('E10591613Y ','YEMP_105916_01_13_Y E02-E10'); CALL SYMPUT ('E10591614D ','YEMP_105916_01_14_D E02-E10'); CALL SYMPUT ('E10591614M ','YEMP_105916_01_14_M E02-E10'); CALL SYMPUT ('E10591614Y ','YEMP_105916_01_14_Y E02-E10'); CALL SYMPUT ('E10591615D ','YEMP_105916_01_15_D E02-E10'); CALL SYMPUT ('E10591615M ','YEMP_105916_01_15_M E02-E10'); CALL SYMPUT ('E10591615Y ','YEMP_105916_01_15_Y E02-E10'); CALL SYMPUT ('E10591616D ','YEMP_105916_01_16_D E02-E10'); CALL SYMPUT ('E10591616M ','YEMP_105916_01_16_M E02-E10'); CALL SYMPUT ('E10591616Y ','YEMP_105916_01_16_Y E02-E10'); CALL SYMPUT ('E10591617D ','YEMP_105916_01_17_D E02-E10'); CALL SYMPUT ('E10591617M ','YEMP_105916_01_17_M E02-E10'); CALL SYMPUT ('E10591617Y ','YEMP_105916_01_17_Y E02-E10'); CALL SYMPUT ('E10591618D ','YEMP_105916_01_18_D E02-E10'); CALL SYMPUT ('E10591618M ','YEMP_105916_01_18_M E02-E10'); CALL SYMPUT ('E10591618Y ','YEMP_105916_01_18_Y E02-E10'); CALL SYMPUT ('E10591619D ','YEMP_105916_01_19_D E02-E10'); CALL SYMPUT ('E10591619M ','YEMP_105916_01_19_M E02-E10'); CALL SYMPUT ('E10591619Y ','YEMP_105916_01_19_Y E02-E10'); CALL SYMPUT ('E10591620D ','YEMP_105916_01_20_D E02-E10'); CALL SYMPUT ('E10591620M ','YEMP_105916_01_20_M E02-E10'); CALL SYMPUT ('E10591620Y ','YEMP_105916_01_20_Y E02-E10'); CALL SYMPUT ('E10591621D ','YEMP_105916_01_21_D E02-E10'); CALL SYMPUT ('E10591621M ','YEMP_105916_01_21_M E02-E10'); CALL SYMPUT ('E10591621Y ','YEMP_105916_01_21_Y E02-E10'); CALL SYMPUT ('E105920 ', 'YEMP_105920_01-YEMP_105920_04 E05-E10'); CALL SYMPUT ('E10593801 ','YEMP_105938_01_01 YEMP_105938_02_01 YEMP_105938_03_01 YEMP_105938_04_01 E05-E10'); CALL SYMPUT ('E10593802 ','YEMP_105938_01_02 YEMP_105938_02_02 YEMP_105938_03_02 E04-E10'); CALL SYMPUT ('E10593803 ','YEMP_105938_01_03 YEMP_105938_02_03 E03-E10'); CALL SYMPUT ('E10593804 ','YEMP_105938_01_04 YEMP_105938_02_04 E03-E10'); CALL SYMPUT ('E10593805 ','YEMP_105938_01_05 YEMP_105938_02_05 E03-E10'); CALL SYMPUT ('E10593806 ','YEMP_105938_01_06 YEMP_105938_02_06 E03-E10'); CALL SYMPUT ('E10593807 ','YEMP_105938_01_07 E02-E10'); CALL SYMPUT ('E10593808 ','YEMP_105938_01_08 E02-E10'); CALL SYMPUT ('E10593809 ','YEMP_105938_01_09 E02-E10'); CALL SYMPUT ('E10593810 ','YEMP_105938_01_10 E02-E10'); CALL SYMPUT ('E10593811 ','YEMP_105938_01_11 E02-E10'); CALL SYMPUT ('E10593812 ','YEMP_105938_01_12 E02-E10'); CALL SYMPUT ('E10593813 ','YEMP_105938_01_13 E02-E10'); CALL SYMPUT ('E10593814 ','YEMP_105938_01_14 E02-E10'); CALL SYMPUT ('E10593815 ','YEMP_105938_01_15 E02-E10'); CALL SYMPUT ('E10593816 ','YEMP_105938_01_16 E02-E10'); CALL SYMPUT ('E10593817 ','YEMP_105938_01_17 E02-E10'); CALL SYMPUT ('E10593818 ','YEMP_105938_01_18 E02-E10'); CALL SYMPUT ('E10593819 ','YEMP_105938_01_19 E02-E10'); CALL SYMPUT ('E10593820 ','YEMP_105938_01_20 E02-E10'); CALL SYMPUT ('E10593821 ','YEMP_105938_01_21 E02-E10'); CALL SYMPUT ('E10595001 ','YEMP_105950_01_01 YEMP_105950_02_01 E03-E10'); CALL SYMPUT ('E10595002 ','YEMP_105950_01_02 YEMP_105950_02_02 E03-E10'); CALL SYMPUT ('E10595003 ','YEMP_105950_01_03 E02-E10'); CALL SYMPUT ('E10595006 ','YEMP_105950_01_06 E02-E10'); CALL SYMPUT ('E10595019 ','YEMP_105950_01_19 E02-E10'); CALL SYMPUT ('E119000 ','YEMP_119000_01-YEMP_119000_08 E09-E10'); CALL SYMPUT ('E119200 ','YEMP_119200_01-YEMP_119200_08 E09-E10'); CALL SYMPUT ('E119300 ','YEMP_119300_01-YEMP_119300_08 E09-E10'); CALL SYMPUT ('E19400 ', 'YEMP_19400_01-YEMP_19400_08 E09-E10'); CALL SYMPUT ('E212001 ','YEMP_21200_01_1 YEMP_21200_02_1 YEMP_21200_03_1 YEMP_21200_04_1 YEMP_21200_05_1 YEMP_21200_06_1 YEMP_21200_07_1 E08-E10'); CALL SYMPUT ('E212002 ','YEMP_21200_01_2 YEMP_21200_02_2 YEMP_21200_03_2 YEMP_21200_04_2 YEMP_21200_05_2 YEMP_21200_06_2 YEMP_21200_07_2 E08-E10'); CALL SYMPUT ('E212003 ','YEMP_21200_01_3 YEMP_21200_02_3 YEMP_21200_03_3 YEMP_21200_04_3 YEMP_21200_05_3 YEMP_21200_06_3 YEMP_21200_07_3 E08-E10'); CALL SYMPUT ('E212004 ','YEMP_21200_01_4 YEMP_21200_02_4 YEMP_21200_03_4 YEMP_21200_04_4 YEMP_21200_05_4 YEMP_21200_06_4 YEMP_21200_07_4 E08-E10'); CALL SYMPUT ('E212005 ','YEMP_21200_01_5 YEMP_21200_02_5 YEMP_21200_03_5 YEMP_21200_04_5 YEMP_21200_05_5 YEMP_21200_06_5 YEMP_21200_07_5 E08-E10'); CALL SYMPUT ('E212006 ','YEMP_21200_01_6 YEMP_21200_02_6 YEMP_21200_03_6 YEMP_21200_04_6 YEMP_21200_05_6 YEMP_21200_06_6 YEMP_21200_07_6 E08-E10'); CALL SYMPUT ('E2160002 ','YEMP_21600_01_02 YEMP_21600_02_02 YEMP_21600_03_02 YEMP_21600_04_02 E05 YEMP_21600_06_02 YEMP_21600_07_02 E08-E10'); CALL SYMPUT ('E2160003 ','YEMP_21600_01_03 YEMP_21600_02_03 YEMP_21600_03_03 YEMP_21600_04_03 YEMP_21600_05_03 E06-E10'); CALL SYMPUT ('E2160004 ','YEMP_21600_01_04 YEMP_21600_02_04 YEMP_21600_03_04 YEMP_21600_04_04 YEMP_21600_05_04 YEMP_21600_06_04 E07-E10'); CALL SYMPUT ('E2160005 ','YEMP_21600_01_05 YEMP_21600_02_05 YEMP_21600_03_05 YEMP_21600_04_05 E05-E10'); CALL SYMPUT ('E2160006 ','YEMP_21600_01_06 YEMP_21600_02_06 YEMP_21600_03_06 E04-E10'); CALL SYMPUT ('E2250002 ','YEMP_22500_01_02 YEMP_22500_02_02 YEMP_22500_03_02 YEMP_22500_04_02 E05 YEMP_22500_06_02 YEMP_22500_07_02 E08-E10'); CALL SYMPUT ('E2250003 ','YEMP_22500_01_03 YEMP_22500_02_03 YEMP_22500_03_03 YEMP_22500_04_03 YEMP_22500_05_03 E06-E10'); CALL SYMPUT ('E2250004 ','YEMP_22500_01_04 YEMP_22500_02_04 YEMP_22500_03_04 YEMP_22500_04_04 YEMP_22500_05_04 YEMP_22500_06_04 E07-E10'); CALL SYMPUT ('E2250005 ','YEMP_22500_01_05 YEMP_22500_02_05 YEMP_22500_03_05 YEMP_22500_04_05 E05-E10'); CALL SYMPUT ('E2250006 ','YEMP_22500_01_06 YEMP_22500_02_06 YEMP_22500_03_06 E04-E10'); CALL SYMPUT ('E2253002 ','YEMP_22530_01_02 YEMP_22530_02_02 E03-E10'); CALL SYMPUT ('E2253003 ','YEMP_22530_01_03 E02 YEMP_22530_03_03 E04-E10'); CALL SYMPUT ('E2253004 ','YEMP_22530_01_04 YEMP_22530_02_04 E03-E10'); CALL SYMPUT ('E2253005 ','YEMP_22530_01_05 YEMP_22530_02_05 YEMP_22530_03_05 E04-E10'); CALL SYMPUT ('E2253502 ','YEMP_22535_01_02 YEMP_22535_02_02 E03-E10'); CALL SYMPUT ('E2253503 ','YEMP_22535_01_03 E02 YEMP_22535_03_03 E04-E10'); CALL SYMPUT ('E2253504 ','YEMP_22535_01_04 YEMP_22535_02_04 E03-E10'); CALL SYMPUT ('E2253505 ','YEMP_22535_01_05 YEMP_22535_02_05 YEMP_22535_03_05 E04-E10'); CALL SYMPUT ('E2255002 ','YEMP_22550_01_02 YEMP_22550_02_02 YEMP_22550_03_02 YEMP_22550_04_02 E05 YEMP_22550_06_02 E07-E10'); CALL SYMPUT ('E2255003 ','YEMP_22550_01_03 E02-E10'); CALL SYMPUT ('E2255004 ','YEMP_22550_01_04 E02-E10'); CALL SYMPUT ('E2255005 ','YEMP_22550_01_05 YEMP_22550_02_05 E03-E10'); CALL SYMPUT ('E22900 ','YEMP_22900_01-YEMP_22900_07 E08-E10'); CALL SYMPUT ('E23000 ','YEMP_23000_01-YEMP_23000_08 E09 E10'); CALL SYMPUT ('E23200 ','YEMP_23200_01-YEMP_23200_03 E04-E10'); CALL SYMPUT ('E23901 ','YEMP_23901_01-YEMP_23901_08 E09 E10'); CALL SYMPUT ('E24501 ','YEMP_24501_01-YEMP_24501_06 E07-E10'); CALL SYMPUT ('E24502 ','YEMP_24502_01-YEMP_24502_06 E07-E10'); CALL SYMPUT ('E24502A ','YEMP_24502A_01 YEMP_24502A_02 E03-E10'); CALL SYMPUT ('E24514 ','YEMP_24514_01-YEMP_24514_06 E07-E10'); CALL SYMPUT ('E33400 ','YEMP_33400_01-YEMP_33400_06 E07-E10'); CALL SYMPUT ('E33500 ','YEMP_33500_01-YEMP_33500_06 E07-E10'); CALL SYMPUT ('E33600 ','YEMP_33600_01-YEMP_33600_05 E06-E10'); CALL SYMPUT ('E34402AAB ','YEMP_34402AAB_01-YEMP_34402AAB_03 E04-E10'); CALL SYMPUT ('E34402AAD ','YEMP_34402AAD_01-YEMP_34402AAD_03 E04-E10'); CALL SYMPUT ('E34402AB ','YEMP_34402AB_01-YEMP_34402AB_05 E06-E10'); CALL SYMPUT ('E34402 ','YEMP_34402_01-YEMP_34402_06 E07-E10'); CALL SYMPUT ('E34403 ','YEMP_34403_01-YEMP_34403_03 E04-E10'); CALL SYMPUT ('E34404A ','YEMP_34404A_01 YEMP_34404A_02 E03-E10'); CALL SYMPUT ('E34404 ','YEMP_34404_01-YEMP_34404_03 E04-E10'); CALL SYMPUT ('E34413C ','YEMP_34413C_01-YEMP_34413C_03 E04-E10'); CALL SYMPUT ('E34413E ','YEMP_34413E_01 E02-E10'); CALL SYMPUT ('E34428 ','YEMP_34428_01-YEMP_34428_03 E04-E10'); CALL SYMPUT ('E35600 ','YEMP_35600_01-YEMP_35600_06 E07-E10'); CALL SYMPUT ('E36100 ','YEMP_36100_01-YEMP_36100_04 E05-E10'); CALL SYMPUT ('E36200 ','YEMP_36200_01-YEMP_36200_05 E06-E10'); CALL SYMPUT ('E37701 ','YEMP_37701_01-YEMP_37701_08 E09-E10'); CALL SYMPUT ('E37901B ','YEMP_37901B_01-YEMP_37901B_08 E09-E10'); CALL SYMPUT ('E37904 ','YEMP_37904_01-YEMP_37904_07 E08-E10'); CALL SYMPUT ('E38000B ','YEMP_38000B_01-YEMP_38000B_07 E08-E10'); CALL SYMPUT ('E38000F ','YEMP_38000F_01-YEMP_38000F_04 E05 YEMP_38000F_06 E07-E10'); CALL SYMPUT ('E38002 ','YEMP_38002_01-YEMP_38002_04 E05 YEMP_38002_06 E07-E10'); CALL SYMPUT ('E38003 ','YEMP_38003_01-YEMP_38003_04 E05 YEMP_38003_06 E07-E10'); CALL SYMPUT ('E38012B ','YEMP_38012B_01 E02-E10'); CALL SYMPUT ('E38012 ','YEMP_38012_01-YEMP_38012_04 E05 YEMP_38012_06 E07-E10'); CALL SYMPUT ('E38013B ','YEMP_38013B_01-YEMP_38013B_03 E04-E10'); CALL SYMPUT ('E38013 ','YEMP_38013_01-YEMP_38013_07 E08-E10'); CALL SYMPUT ('E38014 ','YEMP_38014_01-YEMP_38014_06 E07-E10'); CALL SYMPUT ('E38019W ','YEMP_38019_WKSYR_01-YEMP_38019_WKSYR_06 E07-E10'); CALL SYMPUT ('E38023 ','YEMP_38023_01-YEMP_38023_06 E07-E10'); CALL SYMPUT ('E38024B ','YEMP_38024B_01-YEMP_38024B_02 E03-E10'); CALL SYMPUT ('E38024C ','YEMP_38024C_01-YEMP_38024C_02 E03-E10'); CALL SYMPUT ('E38027 ','YEMP_38027_01-YEMP_38027_02 E03-E10'); CALL SYMPUT ('E38102 ','YEMP_38102_01-YEMP_38102_04 E05-E10'); CALL SYMPUT ('E38103 ','YEMP_38103_01-YEMP_38103_04 E05-E10'); CALL SYMPUT ('E38105 ','YEMP_38105_01-YEMP_38105_04 E05-E10'); CALL SYMPUT ('E38106 ','YEMP_38106_01-YEMP_38106_05 E06-E10'); CALL SYMPUT ('E38107 ','YEMP_38107_01-YEMP_38107_05 E06-E10'); CALL SYMPUT ('E38112W ','YEMP_38112_WKSYR_01-YEMP_38112_WKSYR_02 E03-E10'); CALL SYMPUT ('E38116B ','E01 YEMP_38116B_02 E03-E10'); CALL SYMPUT ('E38116 ','YEMP_38116_01-YEMP_38116_05 E06-E10'); CALL SYMPUT ('E38201 ','YEMP_38201_01-YEMP_38201_05 E06-E10'); CALL SYMPUT ('E38202 ','YEMP_38202_01-YEMP_38202_05 E06-E10'); CALL SYMPUT ('E38211 ','YEMP_38211_01-YEMP_38211_05 E06-E10'); CALL SYMPUT ('E38329B ','YEMP_38329B_01-YEMP_38329B_05 E06-E10'); CALL SYMPUT ('E38329D ','YEMP_38329D_01-YEMP_38329D_05 E06-E10'); CALL SYMPUT ('E38329IB ','YEMP_38329IB_01 E02-E10'); CALL SYMPUT ('E38329I ','YEMP_38329I_01 E02-E10'); CALL SYMPUT ('E38329K ','YEMP_38329K_01 E02-E10'); CALL SYMPUT ('E3840701 ','YEMP_38407_01_01 YEMP_38407_02_01 YEMP_38407_03_01 E04-E10'); CALL SYMPUT ('E3840702 ','YEMP_38407_01_02 YEMP_38407_02_02 YEMP_38407_03_02 E04-E10'); CALL SYMPUT ('E3840703 ','YEMP_38407_01_03 YEMP_38407_02_03 YEMP_38407_03_03 YEMP_38407_04_03 E05 YEMP_38407_06_03 E07-E10'); CALL SYMPUT ('E3840704 ','YEMP_38407_01_04 YEMP_38407_02_04 YEMP_38407_03_04 E04-E10'); CALL SYMPUT ('E3840705 ','YEMP_38407_01_05 YEMP_38407_02_05 YEMP_38407_03_05 E04-E10'); CALL SYMPUT ('E38416IB03 ','YEMP_38416IB_01_03 E02-E10'); CALL SYMPUT ('E38416IB04 ','YEMP_38416IB_01_04 E02-E10'); CALL SYMPUT ('E38416ID03 ','YEMP_38416ID_01_03 E02-E10'); CALL SYMPUT ('E38416ID04 ','YEMP_38416ID_01_04 E02-E10'); CALL SYMPUT ('E38416I03 ','YEMP_38416I_01_03 E02-E10'); CALL SYMPUT ('E38416I04 ','YEMP_38416I_01_04 E02-E10'); CALL SYMPUT ('E38416K01 ','YEMP_38416K_01_01 E02-E10'); CALL SYMPUT ('E38416K05 ','YEMP_38416K_01_05 E02-E10'); CALL SYMPUT ('E3841601 ','YEMP_38416_01_01 YEMP_38416_02_01 YEMP_38416_03_01 E04-E10'); CALL SYMPUT ('E3841602 ','YEMP_38416_01_02 YEMP_38416_02_02 YEMP_38416_03_02 E04-E10'); CALL SYMPUT ('E3841603 ','YEMP_38416_01_03 YEMP_38416_02_03 YEMP_38416_03_03 YEMP_38416_04_03 E05 YEMP_38416_06_03 E07-E10'); CALL SYMPUT ('E3841604 ','YEMP_38416_01_04 YEMP_38416_02_04 YEMP_38416_03_04 E04-E10'); CALL SYMPUT ('E3841605 ','YEMP_38416_01_05 YEMP_38416_02_05 YEMP_38416_03_05 E04-E10'); CALL SYMPUT ('E58201 ','YEMP_58201_01-YEMP_58201_10'); CALL SYMPUT ('E58401 ','YEMP_58401_01-YEMP_58401_10'); CALL SYMPUT ('E59900 ','YEMP_59900_01-YEMP_59900_09 E10'); CALL SYMPUT ('E59901 ','YEMP_59901_01-YEMP_59901_06 E07-E10'); CALL SYMPUT ('E83100 ','YEMP_83100_01-YEMP_83100_09 E10'); CALL SYMPUT ('E83300 ','YEMP_83300_01-YEMP_83300_09 E10'); CALL SYMPUT ('E86800 ','YEMP_86800_01-YEMP_86800_08 E09-E10'); CALL SYMPUT ('E86900 ','YEMP_86900_01-YEMP_86900_09 E10'); CALL SYMPUT ('E87100 ','YEMP_87100_01-YEMP_87100_05 E06 E07 YEMP_87100_08 E09-E10'); CALL SYMPUT ('E88000 ','YEMP_88000_01-YEMP_88000_09 E10'); CALL SYMPUT ('E88501 ','YEMP_88501_01-YEMP_88501_05 E06 YEMP_88501_07 E08-E10'); CALL SYMPUT ('E88502A ','YEMP_88502A_01 YEMP_88502A_02 E03-E10'); CALL SYMPUT ('E88502 ','YEMP_88502_01-YEMP_88502_05 E06 YEMP_88502_07 E08-E10'); CALL SYMPUT ('E88512 ','YEMP_88512_01-YEMP_88512_05 E06 YEMP_88512_07 E08-E10'); CALL SYMPUT ('E97300 ','YEMP_97300_01-YEMP_97300_07 E08 YEMP_97300_09 E10'); CALL SYMPUT ('E97400 ','YEMP_97400_01-YEMP_97400_07 E08-E10'); CALL SYMPUT ('E97500 ','YEMP_97500_01-YEMP_97500_05 E06 YEMP_97500_07 E08 YEMP_97500_09 E10'); CALL SYMPUT ('E98300 ','YEMP_98300_01-YEMP_98300_07 E08-E10'); CALL SYMPUT ('E98402CAA ','YEMP_98402CAA_01-YEMP_98402CAA_05 E06-E10'); CALL SYMPUT ('E98402CAB ','YEMP_98402CAB_01-YEMP_98402CAB_05 E06-E10'); CALL SYMPUT ('E98402D ','YEMP_98402D_01-YEMP_98402D_05 E06-E10'); CALL SYMPUT ('E98402 ','YEMP_98402_01-YEMP_98402_07 E08 YEMP_98402_09 E10'); CALL SYMPUT ('E98403 ','YEMP_98403_01-YEMP_98403_05 E06-E10'); CALL SYMPUT ('E98404ABX ','YEMP_98404ABX_01 YEMP_98404ABX_02 E03-E10'); CALL SYMPUT ('E98404A ','YEMP_98404A_01-YEMP_98404A_05 E06-E10'); CALL SYMPUT ('E98414AAA ','YEMP_98414AAA_01 E02-E10'); CALL SYMPUT ('E98414AAB ','YEMP_98414AAB_01 E02-E10'); CALL SYMPUT ('E98414B ','YEMP_98414B_01 E02-E10'); CALL SYMPUT ('E98414 ','YEMP_98414_01-YEMP_98414_05 E06-E10'); CALL SYMPUT ('E98429 ','YEMP_98429_01-YEMP_98429_05 E06-E10'); CALL SYMPUT ('E9899M ','YEMP_9899M_01-YEMP_9899M_04 E05-E10'); CALL SYMPUT ('E99500 ','YEMP_99500_01-YEMP_99500_07 E08-E10'); CALL SYMPUT ('R0CUR ','YEMP_CURFLAG_01-YEMP_CURFLAG_10'); CALL SYMPUT ('R0MIL ','YEMP_MILFLAG_01-YEMP_MILFLAG_10'); CALL SYMPUT ('R0SEL ','YEMP_SELFEMP_01-YEMP_SELFEMP_10'); CALL SYMPUT ('R0UID ','YEMP_UID_01-YEMP_UID_10'); CALL SYMPUT ('R0STAD ','YEMP_STARTDATE_D_01-YEMP_STARTDATE_D_10'); CALL SYMPUT ('R0STAM ','YEMP_STARTDATE_M_01-YEMP_STARTDATE_M_10'); CALL SYMPUT ('R0STAY ','YEMP_STARTDATE_Y_01-YEMP_STARTDATE_Y_10'); CALL SYMPUT ('R0STOD ','YEMP_STOPDATE_D_01-YEMP_STOPDATE_D_10'); CALL SYMPUT ('R0STOM ','YEMP_STOPDATE_M_01-YEMP_STOPDATE_M_10'); CALL SYMPUT ('R0STOY ','YEMP_STOPDATE_Y_01-YEMP_STOPDATE_Y_10'); CALL SYMPUT ('E10240010D ','E01-E10'); CALL SYMPUT ('E10240010M ','E01-E10'); CALL SYMPUT ('E10240010Y ','E01-E10'); CALL SYMPUT ('E10240011D ','E01-E10'); CALL SYMPUT ('E10240011M ','E01-E10'); CALL SYMPUT ('E10240011Y ','E01-E10'); CALL SYMPUT ('E10240012D ','E01-E10'); CALL SYMPUT ('E10240012M ','E01-E10'); CALL SYMPUT ('E10240012Y ','E01-E10'); CALL SYMPUT ('E10240013D ','E01-E10'); CALL SYMPUT ('E10240013M ','E01-E10'); CALL SYMPUT ('E10240013Y ','E01-E10'); CALL SYMPUT ('E10240014D ','E01-E10'); CALL SYMPUT ('E10240014M ','E01-E10'); CALL SYMPUT ('E10240014Y ','E01-E10'); CALL SYMPUT ('E10240015D ','E01-E10'); CALL SYMPUT ('E10240015M ','E01-E10'); CALL SYMPUT ('E10240015Y ','E01-E10'); CALL SYMPUT ('E10240016D ','E01-E10'); CALL SYMPUT ('E10240016M ','E01-E10'); CALL SYMPUT ('E10240016Y ','E01-E10'); CALL SYMPUT ('E10240017D ','E01-E10'); CALL SYMPUT ('E10240017M ','E01-E10'); CALL SYMPUT ('E10240017Y ','E01-E10'); CALL SYMPUT ('E10240018D ','E01-E10'); CALL SYMPUT ('E10240018M ','E01-E10'); CALL SYMPUT ('E10240018Y ','E01-E10'); CALL SYMPUT ('E10240019D ','E01-E10'); CALL SYMPUT ('E10240019M ','E01-E10'); CALL SYMPUT ('E10240019Y ','E01-E10'); CALL SYMPUT ('E10240020D ','E01-E10'); CALL SYMPUT ('E10240020M ','E01-E10'); CALL SYMPUT ('E10240020Y ','E01-E10'); CALL SYMPUT ('E10240021D ','E01-E10'); CALL SYMPUT ('E10240021M ','E01-E10'); CALL SYMPUT ('E10240021Y ','E01-E10'); CALL SYMPUT ('E10270009D ','E01-E10'); CALL SYMPUT ('E10270009M ','E01-E10'); CALL SYMPUT ('E10270009Y ','E01-E10'); CALL SYMPUT ('E10270010D ','E01-E10'); CALL SYMPUT ('E10270010M ','E01-E10'); CALL SYMPUT ('E10270010Y ','E01-E10'); CALL SYMPUT ('E10270011D ','E01-E10'); CALL SYMPUT ('E10270011M ','E01-E10'); CALL SYMPUT ('E10270011Y ','E01-E10'); CALL SYMPUT ('E10270012D ','E01-E10'); CALL SYMPUT ('E10270012M ','E01-E10'); CALL SYMPUT ('E10270012Y ','E01-E10'); CALL SYMPUT ('E10270013D ','E01-E10'); CALL SYMPUT ('E10270013M ','E01-E10'); CALL SYMPUT ('E10270013Y ','E01-E10'); CALL SYMPUT ('E10270014D ','E01-E10'); CALL SYMPUT ('E10270014M ','E01-E10'); CALL SYMPUT ('E10270014Y ','E01-E10'); CALL SYMPUT ('E10270015D ','E01-E10'); CALL SYMPUT ('E10270015M ','E01-E10'); CALL SYMPUT ('E10270015Y ','E01-E10'); CALL SYMPUT ('E10270016D ','E01-E10'); CALL SYMPUT ('E10270016M ','E01-E10'); CALL SYMPUT ('E10270016Y ','E01-E10'); CALL SYMPUT ('E10270017D ','E01-E10'); CALL SYMPUT ('E10270017M ','E01-E10'); CALL SYMPUT ('E10270017Y ','E01-E10'); CALL SYMPUT ('E10270018D ','E01-E10'); CALL SYMPUT ('E10270018M ','E01-E10'); CALL SYMPUT ('E10270018Y ','E01-E10'); CALL SYMPUT ('E10270019D ','E01-E10'); CALL SYMPUT ('E10270019M ','E01-E10'); CALL SYMPUT ('E10270019Y ','E01-E10'); CALL SYMPUT ('E10270020D ','E01-E10'); CALL SYMPUT ('E10270020M ','E01-E10'); CALL SYMPUT ('E10270020Y ','E01-E10'); CALL SYMPUT ('E10270021D ','E01-E10'); CALL SYMPUT ('E10270021M ','E01-E10'); CALL SYMPUT ('E10270021Y ','E01-E10'); CALL SYMPUT ('STARD ','STARD01-STARD10'); CALL SYMPUT ('STARM ','STARM01-STARM10'); CALL SYMPUT ('STARY ','STARY01-STARY10'); CALL SYMPUT ('STOPD ','STOPD01-STOPD10'); CALL SYMPUT ('STOPM ','STOPM01-STOPM10'); CALL SYMPUT ('STOPY ','STOPY01-STOPY10'); CALL SYMPUT ('STARW ','STARW01-STARW10'); CALL SYMPUT ('STOPW ','STOPW01-STOPW10'); CALL SYMPUT ('SMOF ','SMOF01-SMOF10'); CALL SYMPUT ('EMOF ','EMOF01-EMOF10'); CALL SYMPUT ('BGFL_01 ','BGFL01_01 BGFL02_01 BGFL03_01 BGFL04_01 BGFL05_01 BGFL06_01 BGFL07_01 E08-E10'); CALL SYMPUT ('BGFL_02 ','BGFL01_02 BGFL02_02 BGFL03_02 E04-E10'); CALL SYMPUT ('BGFL_03 ','BGFL01_03 BGFL02_03 BGFL03_03 E04-E10'); CALL SYMPUT ('BGFL_04 ','BGFL01_04 BGFL02_04 BGFL03_04 E03-E10'); CALL SYMPUT ('BGFL_05 ','BGFL01_05 BGFL02_05 BGFL03_05 E03-E10'); CALL SYMPUT ('BGFL_06 ','BGFL01_06 BGFL02_06 BGFL03_06 E04-E10'); CALL SYMPUT ('BGFL_07 ','BGFL01_07 E02-E10'); CALL SYMPUT ('BGFL_08 ','BGFL01_08 E02-E10'); CALL SYMPUT ('BGFL_09 ','BGFL01_09 E02-E10'); CALL SYMPUT ('BGFL_10 ','BGFL01_10 E02-E10'); CALL SYMPUT ('BGFL_11 ','BGFL01_11 E02-E10'); CALL SYMPUT ('BGFL_12 ','BGFL01_12 E02-E10'); CALL SYMPUT ('BGFL_13 ','BGFL01_13 E02-E10'); CALL SYMPUT ('BGFL_14 ','BGFL01_14 E02-E10'); CALL SYMPUT ('BGFL_15 ','BGFL01_15 E02-E10'); CALL SYMPUT ('BGFL_16 ','BGFL01_16 E02-E10'); CALL SYMPUT ('BGFL_17 ','BGFL01_17 E02-E10'); CALL SYMPUT ('BGFL_18 ','BGFL01_18 E02-E10'); CALL SYMPUT ('BGFL_19 ','BGFL01_19 E02-E10'); CALL SYMPUT ('BGFL_20 ','BGFL01_20 E02-E10'); CALL SYMPUT ('BGFL_21 ','BGFL01_21 E02-E10'); CALL SYMPUT ('EGFL_01 ','EGFL01_01 EGFL02_01 EGFL03_01 EGFL04_01 EGFL05_01 EGFL06_01 EGFL07_01 E08-E10'); CALL SYMPUT ('EGFL_02 ','EGFL01_02 EGFL02_02 EGFL03_02 E04-E10'); CALL SYMPUT ('EGFL_03 ','EGFL01_03 EGFL02_03 EGFL03_03 E04-E10'); CALL SYMPUT ('EGFL_04 ','EGFL01_04 EGFL02_04 EGFL03_04 E04-E10'); CALL SYMPUT ('EGFL_05 ','EGFL01_05 EGFL02_05 EGFL03_05 E04-E10'); CALL SYMPUT ('EGFL_06 ','EGFL01_06 EGFL02_06 EGFL03_06 E04-E10'); CALL SYMPUT ('EGFL_07 ','EGFL01_07 E02-E10'); CALL SYMPUT ('EGFL_08 ','EGFL01_08 E02-E10'); CALL SYMPUT ('EGFL_09 ','EGFL01_09 E02-E10'); CALL SYMPUT ('EGFL_10 ','EGFL01_10 E02-E10'); CALL SYMPUT ('EGFL_11 ','EGFL01_11 E02-E10'); CALL SYMPUT ('EGFL_12 ','EGFL01_12 E02-E10'); CALL SYMPUT ('EGFL_13 ','EGFL01_13 E02-E10'); CALL SYMPUT ('EGFL_14 ','EGFL01_14 E02-E10'); CALL SYMPUT ('EGFL_15 ','EGFL01_15 E02-E10'); CALL SYMPUT ('EGFL_16 ','EGFL01_16 E02-E10'); CALL SYMPUT ('EGFL_17 ','EGFL01_17 E02-E10'); CALL SYMPUT ('EGFL_18 ','EGFL01_18 E02-E10'); CALL SYMPUT ('EGFL_19 ','EGFL01_19 E02-E10'); CALL SYMPUT ('EGFL_20 ','EGFL01_20 E02-E10'); CALL SYMPUT ('EGFL_21 ','EGFL01_21 E02-E10'); CALL SYMPUT ('BGAP_01 ','BGAP01_01 BGAP02_01 BGAP03_01 BGAP04_01 BGAP05_01 BGAP06_01 BGAP07_01 E08-E10'); CALL SYMPUT ('BGAP_02 ','BGAP01_02 BGAP02_02 BGAP03_02 E04-E10'); CALL SYMPUT ('BGAP_03 ','BGAP01_03 BGAP02_03 BGAP03_03 E04-E10'); CALL SYMPUT ('BGAP_04 ','BGAP01_04 BGAP02_04 BGAP03_04 E04-E10'); CALL SYMPUT ('BGAP_05 ','BGAP01_05 BGAP02_05 BGAP03_05 E04-E10'); CALL SYMPUT ('BGAP_06 ','BGAP01_06 BGAP02_06 BGAP03_06 E04-E10'); CALL SYMPUT ('BGAP_07 ','BGAP01_07 E02-E10'); CALL SYMPUT ('BGAP_08 ','BGAP01_08 E02-E10'); CALL SYMPUT ('BGAP_09 ','BGAP01_09 E02-E10'); CALL SYMPUT ('BGAP_10 ','BGAP01_10 E02-E10'); CALL SYMPUT ('BGAP_11 ','BGAP01_11 E02-E10'); CALL SYMPUT ('BGAP_12 ','BGAP01_12 E02-E10'); CALL SYMPUT ('BGAP_13 ','BGAP01_13 E02-E10'); CALL SYMPUT ('BGAP_14 ','BGAP01_14 E02-E10'); CALL SYMPUT ('BGAP_15 ','BGAP01_15 E02-E10'); CALL SYMPUT ('BGAP_16 ','BGAP01_16 E02-E10'); CALL SYMPUT ('BGAP_17 ','BGAP01_17 E02-E10'); CALL SYMPUT ('BGAP_18 ','BGAP01_18 E02-E10'); CALL SYMPUT ('BGAP_19 ','BGAP01_19 E02-E10'); CALL SYMPUT ('BGAP_20 ','BGAP01_20 E02-E10'); CALL SYMPUT ('BGAP_21 ','BGAP01_21 E02-E10'); CALL SYMPUT ('EGAP_01 ','EGAP01_01 EGAP02_01 EGAP03_01 EGAP04_01 EGAP05_01 EGAP06_01 EGAP07_01 E08-E10'); CALL SYMPUT ('EGAP_02 ','EGAP01_02 EGAP02_02 EGAP03_02 E04-E10'); CALL SYMPUT ('EGAP_03 ','EGAP01_03 EGAP02_03 EGAP03_03 E04-E10'); CALL SYMPUT ('EGAP_04 ','EGAP01_04 EGAP02_04 EGAP03_04 E04-E10'); CALL SYMPUT ('EGAP_05 ','EGAP01_05 EGAP02_05 EGAP03_05 E04-E10'); CALL SYMPUT ('EGAP_06 ','EGAP01_06 EGAP02_06 EGAP03_06 E04-E10'); CALL SYMPUT ('EGAP_07 ','EGAP01_07 E02-E10'); CALL SYMPUT ('EGAP_08 ','EGAP01_08 E02-E10'); CALL SYMPUT ('EGAP_09 ','EGAP01_09 E02-E10'); CALL SYMPUT ('EGAP_10 ','EGAP01_10 E02-E10'); CALL SYMPUT ('EGAP_11 ','EGAP01_11 E02-E10'); CALL SYMPUT ('EGAP_12 ','EGAP01_12 E02-E10'); CALL SYMPUT ('EGAP_13 ','EGAP01_13 E02-E10'); CALL SYMPUT ('EGAP_14 ','EGAP01_14 E02-E10'); CALL SYMPUT ('EGAP_15 ','EGAP01_15 E02-E10'); CALL SYMPUT ('EGAP_16 ','EGAP01_16 E02-E10'); CALL SYMPUT ('EGAP_17 ','EGAP01_17 E02-E10'); CALL SYMPUT ('EGAP_18 ','EGAP01_18 E02-E10'); CALL SYMPUT ('EGAP_19 ','EGAP01_19 E02-E10'); CALL SYMPUT ('EGAP_20 ','EGAP01_20 E02-E10'); CALL SYMPUT ('EGAP_21 ','EGAP01_21 E02-E10'); CALL SYMPUT ('_BGMDY_01 ','_BGMDY01_01 _BGMDY02_01 _BGMDY03_01 _BGMDY04_01 _BGMDY05_01 _BGMDY06_01 _BGMDY07_01 E08-E10'); CALL SYMPUT ('_BGMDY_02 ','_BGMDY01_02 _BGMDY02_02 _BGMDY03_02 E04-E10'); CALL SYMPUT ('_BGMDY_03 ','_BGMDY01_03 _BGMDY02_03 _BGMDY03_03 E04-E10'); CALL SYMPUT ('_BGMDY_04 ','_BGMDY01_04 _BGMDY02_04 _BGMDY03_04 E04-E10'); CALL SYMPUT ('_BGMDY_05 ','_BGMDY01_05 _BGMDY02_05 _BGMDY03_05 E04-E10'); CALL SYMPUT ('_BGMDY_06 ','_BGMDY01_06 _BGMDY02_06 _BGMDY03_06 E04-E10'); CALL SYMPUT ('_BGMDY_07 ','_BGMDY01_07 E02-E10'); CALL SYMPUT ('_BGMDY_08 ','_BGMDY01_08 E02-E10'); CALL SYMPUT ('_BGMDY_09 ','_BGMDY01_09 E02-E10'); CALL SYMPUT ('_BGMDY_10 ','_BGMDY01_10 E02-E10'); CALL SYMPUT ('_BGMDY_11 ','_BGMDY01_11 E02-E10'); CALL SYMPUT ('_BGMDY_12 ','_BGMDY01_12 E02-E10'); CALL SYMPUT ('_BGMDY_13 ','_BGMDY01_13 E02-E10'); CALL SYMPUT ('_BGMDY_14 ','_BGMDY01_14 E02-E10'); CALL SYMPUT ('_BGMDY_15 ','_BGMDY01_15 E02-E10'); CALL SYMPUT ('_BGMDY_16 ','_BGMDY01_16 E02-E10'); CALL SYMPUT ('_BGMDY_17 ','_BGMDY01_17 E02-E10'); CALL SYMPUT ('_BGMDY_18 ','_BGMDY01_18 E02-E10'); CALL SYMPUT ('_BGMDY_19 ','_BGMDY01_19 E02-E10'); CALL SYMPUT ('_BGMDY_20 ','_BGMDY01_20 E02-E10'); CALL SYMPUT ('_BGMDY_21 ','_BGMDY01_21 E02-E10'); CALL SYMPUT ('_EGMDY_01 ','_EGMDY01_01 _EGMDY02_01 _EGMDY03_01 _EGMDY04_01 _EGMDY05_01 _EGMDY06_01 _EGMDY07_01 E08-E10'); CALL SYMPUT ('_EGMDY_02 ','_EGMDY01_02 _EGMDY02_02 _EGMDY03_02 E04-E10'); CALL SYMPUT ('_EGMDY_03 ','_EGMDY01_03 _EGMDY02_03 _EGMDY03_03 E04-E10'); CALL SYMPUT ('_EGMDY_04 ','_EGMDY01_04 _EGMDY02_04 _EGMDY03_04 E04-E10'); CALL SYMPUT ('_EGMDY_05 ','_EGMDY01_05 _EGMDY02_05 _EGMDY03_05 E04-E10'); CALL SYMPUT ('_EGMDY_06 ','_EGMDY01_06 _EGMDY02_06 _EGMDY03_06 E04-E10'); CALL SYMPUT ('_EGMDY_07 ','_EGMDY01_07 E02-E10'); CALL SYMPUT ('_EGMDY_08 ','_EGMDY01_08 E02-E10'); CALL SYMPUT ('_EGMDY_09 ','_EGMDY01_09 E02-E10'); CALL SYMPUT ('_EGMDY_10 ','_EGMDY01_10 E02-E10'); CALL SYMPUT ('_EGMDY_11 ','_EGMDY01_11 E02-E10'); CALL SYMPUT ('_EGMDY_12 ','_EGMDY01_12 E02-E10'); CALL SYMPUT ('_EGMDY_13 ','_EGMDY01_13 E02-E10'); CALL SYMPUT ('_EGMDY_14 ','_EGMDY01_14 E02-E10'); CALL SYMPUT ('_EGMDY_15 ','_EGMDY01_15 E02-E10'); CALL SYMPUT ('_EGMDY_16 ','_EGMDY01_16 E02-E10'); CALL SYMPUT ('_EGMDY_17 ','_EGMDY01_17 E02-E10'); CALL SYMPUT ('_EGMDY_18 ','_EGMDY01_18 E02-E10'); CALL SYMPUT ('_EGMDY_19 ','_EGMDY01_19 E02-E10'); CALL SYMPUT ('_EGMDY_20 ','_EGMDY01_20 E02-E10'); CALL SYMPUT ('_EGMDY_21 ','_EGMDY01_21 E02-E10'); CALL SYMPUT ('_gdays_01 ','_gdays01_01 _gdays02_01 _gdays03_01 _gdays04_01 _gdays05_01 _gdays06_01 _gdays07_01 E08-E10'); CALL SYMPUT ('_gdays_02 ','_gdays01_02 _gdays02_02 _gdays03_02 E04-E10'); CALL SYMPUT ('_gdays_03 ','_gdays01_03 _gdays02_03 _gdays03_03 E04-E10'); CALL SYMPUT ('_gdays_04 ','_gdays01_04 _gdays02_04 _gdays03_04 E04-E10'); CALL SYMPUT ('_gdays_05 ','_gdays01_05 _gdays02_05 _gdays03_05 E04-E10'); CALL SYMPUT ('_gdays_06 ','_gdays01_06 _gdays02_06 _gdays03_06 E04-E10'); CALL SYMPUT ('_gdays_07 ','_gdays01_07 E02-E10'); CALL SYMPUT ('_gdays_08 ','_gdays01_08 E02-E10'); CALL SYMPUT ('_gdays_09 ','_gdays01_09 E02-E10'); CALL SYMPUT ('_gdays_10 ','_gdays01_10 E02-E10'); CALL SYMPUT ('_gdays_11 ','_gdays01_11 E02-E10'); CALL SYMPUT ('_gdays_12 ','_gdays01_12 E02-E10'); CALL SYMPUT ('_gdays_13 ','_gdays01_13 E02-E10'); CALL SYMPUT ('_gdays_14 ','_gdays01_14 E02-E10'); CALL SYMPUT ('_gdays_15 ','_gdays01_15 E02-E10'); CALL SYMPUT ('_gdays_16 ','_gdays01_16 E02-E10'); CALL SYMPUT ('_gdays_17 ','_gdays01_17 E02-E10'); CALL SYMPUT ('_gdays_18 ','_gdays01_18 E02-E10'); CALL SYMPUT ('_gdays_19 ','_gdays01_19 E02-E10'); CALL SYMPUT ('_gdays_20 ','_gdays01_20 E02-E10'); CALL SYMPUT ('_gdays_21 ','_gdays01_21 E02-E10'); run; data emp_bday (keep=pubid birthwk age14wk age20wk ag18jan birthyr); merge r20.prior (keep=pubid CV_BIRTH_WK birthyr) Wh_rev.wh_vars (keep=pubid age14wk_rev age20wk_rev); by pubid; birthwk=CV_BIRTH_WK; age14wk=age14wk_rev; age20wk=age20wk_rev; ag18jmdy=mdy(01,01,birthyr+18); begmdy=mdy(01,01,1980); ag18jan=intck('week',begmdy,ag18jmdy)+1; data emp_int; merge two(keep=pubid CV_INTERVIEW_DATE_D CV_INTERVIEW_DATE_M CV_INTERVIEW_DATE_Y) r20.prior; by pubid; r1int_d=CV_INTERVIEW_DATE_D_1997; label r1int_d = "CV_INTERVIEW_DATE 1997"; r1int_m=CV_INTERVIEW_DATE_M_1997; label r1int_m = "CV_INTERVIEW_DATE 1997"; r1int_y=CV_INTERVIEW_DATE_Y_1997; label r1int_y = "CV_INTERVIEW_DATE 1997"; r2int_d=CV_INTERVIEW_DATE_D_1998; label r2int_d = "CV_INTERVIEW_DATE 1998"; r2int_m=CV_INTERVIEW_DATE_M_1998; label r2int_m = "CV_INTERVIEW_DATE 1998"; r2int_y=CV_INTERVIEW_DATE_Y_1998; label r2int_y = "CV_INTERVIEW_DATE 1998"; r3int_d=CV_INTERVIEW_DATE_D_1999; label r3int_d = "CV_INTERVIEW_DATE 1999"; r3int_m=CV_INTERVIEW_DATE_M_1999; label r3int_m = "CV_INTERVIEW_DATE 1999"; r3int_y=CV_INTERVIEW_DATE_Y_1999; label r3int_y = "CV_INTERVIEW_DATE 1999"; r4int_d=CV_INTERVIEW_DATE_D_2000; label r4int_d = "CV_INTERVIEW_DATE 2000"; r4int_m=CV_INTERVIEW_DATE_M_2000; label r4int_m = "CV_INTERVIEW_DATE 2000"; r4int_y=CV_INTERVIEW_DATE_Y_2000; label r4int_y = "CV_INTERVIEW_DATE 2000"; r5int_d=CV_INTERVIEW_DATE_D_2001; label r5int_d = "CV_INTERVIEW_DATE 2001"; r5int_m=CV_INTERVIEW_DATE_M_2001; label r5int_m = "CV_INTERVIEW_DATE 2001"; r5int_y=CV_INTERVIEW_DATE_Y_2001; label r5int_y = "CV_INTERVIEW_DATE 2001"; r6int_d=CV_INTERVIEW_DATE_D_2002; label r6int_d = "CV_INTERVIEW_DATE 2002"; r6int_m=CV_INTERVIEW_DATE_M_2002; label r6int_m = "CV_INTERVIEW_DATE 2002"; r6int_y=CV_INTERVIEW_DATE_Y_2002; label r6int_y = "CV_INTERVIEW_DATE 2002"; r7int_d=CV_INTERVIEW_DATE_D_2003; label r7int_d = "CV_INTERVIEW_DATE 2003"; r7int_m=CV_INTERVIEW_DATE_M_2003; label r7int_m = "CV_INTERVIEW_DATE 2003"; r7int_y=CV_INTERVIEW_DATE_Y_2003; label r7int_y = "CV_INTERVIEW_DATE 2003"; r8int_d=CV_INTERVIEW_DATE_D_2004; label r8int_d = "CV_INTERVIEW_DATE 2004"; r8int_m=CV_INTERVIEW_DATE_M_2004; label r8int_m = "CV_INTERVIEW_DATE 2004"; r8int_y=CV_INTERVIEW_DATE_Y_2004; label r8int_y = "CV_INTERVIEW_DATE 2004"; r9int_d=CV_INTERVIEW_DATE_D_2005; label r9int_d = "CV_INTERVIEW_DATE 2005"; r9int_m=CV_INTERVIEW_DATE_M_2005; label r9int_m = "CV_INTERVIEW_DATE 2005"; r9int_y=CV_INTERVIEW_DATE_Y_2005; label r9int_y = "CV_INTERVIEW_DATE 2005"; r10int_d=CV_INTERVIEW_DATE_D_2006; label r10int_d = "CV_INTERVIEW_DATE 2006"; r10int_m=CV_INTERVIEW_DATE_M_2006; label r10int_m = "CV_INTERVIEW_DATE 2006"; r10int_y=CV_INTERVIEW_DATE_Y_2006; label r10int_y = "CV_INTERVIEW_DATE 2006"; r11int_d=CV_INTERVIEW_DATE_D_2007; label r11int_d = "CV_INTERVIEW_DATE 2007"; r11int_m=CV_INTERVIEW_DATE_M_2007; label r11int_m = "CV_INTERVIEW_DATE 2007"; r11int_y=CV_INTERVIEW_DATE_Y_2007; label r11int_y = "CV_INTERVIEW_DATE 2007"; r12int_d=CV_INTERVIEW_DATE_D_2008; label r12int_d = "CV_INTERVIEW_DATE 2008"; r12int_m=CV_INTERVIEW_DATE_M_2008; label r12int_m = "CV_INTERVIEW_DATE 2008"; r12int_y=CV_INTERVIEW_DATE_Y_2008; label r12int_y = "CV_INTERVIEW_DATE 2008"; r13int_d=CV_INTERVIEW_DATE_D_2009; label r13int_d = "CV_INTERVIEW_DATE 2009"; r13int_m=CV_INTERVIEW_DATE_M_2009; label r13int_m = "CV_INTERVIEW_DATE 2009"; r13int_y=CV_INTERVIEW_DATE_Y_2009; label r13int_y = "CV_INTERVIEW_DATE 2009"; r14int_d=CV_INTERVIEW_DATE_D_2010; label r14int_d = "CV_INTERVIEW_DATE 2010"; r14int_m=CV_INTERVIEW_DATE_M_2010; label r14int_m = "CV_INTERVIEW_DATE 2010"; r14int_y=CV_INTERVIEW_DATE_Y_2010; label r14int_y = "CV_INTERVIEW_DATE 2010"; r15int_d=CV_INTERVIEW_DATE_D_2011; label r15int_d = "CV_INTERVIEW_DATE 2011"; r15int_m=CV_INTERVIEW_DATE_M_2011; label r15int_m = "CV_INTERVIEW_DATE 2011"; r15int_y=CV_INTERVIEW_DATE_Y_2011; label r15int_y = "CV_INTERVIEW_DATE 2011"; r16int_d=CV_INTERVIEW_DATE_D_2013; label r16int_d = "CV_INTERVIEW_DATE 2013"; r16int_m=CV_INTERVIEW_DATE_M_2013; label r16int_m = "CV_INTERVIEW_DATE 2013"; r16int_y=CV_INTERVIEW_DATE_Y_2013; label r16int_y = "CV_INTERVIEW_DATE 2013"; r17int_d=CV_INTERVIEW_DATE_D_2015; label r17int_d = "CV_INTERVIEW_DATE 2015"; r17int_m=CV_INTERVIEW_DATE_M_2015; label r17int_m = "CV_INTERVIEW_DATE 2015"; r17int_y=CV_INTERVIEW_DATE_Y_2015; label r17int_y = "CV_INTERVIEW_DATE 2015"; r18int_d=CV_INTERVIEW_DATE_D_2017; label r18int_d = "CV_INTERVIEW_DATE 2017"; r18int_m=CV_INTERVIEW_DATE_M_2017; label r18int_m = "CV_INTERVIEW_DATE 2017"; r18int_y=CV_INTERVIEW_DATE_Y_2017; label r18int_y = "CV_INTERVIEW_DATE 2017"; r19int_d=CV_INTERVIEW_DATE_D_2019; label r19int_d = "CV_INTERVIEW_DATE 2019"; r19int_m=CV_INTERVIEW_DATE_M_2019; label r19int_m = "CV_INTERVIEW_DATE 2019"; r19int_y=CV_INTERVIEW_DATE_Y_2019; label r19int_y = "CV_INTERVIEW_DATE 2019"; r0int_d=CV_INTERVIEW_DATE_D; label r0int_d = "CV_INTERVIEW_DATE 2021"; r0int_m=CV_INTERVIEW_DATE_M; label r0int_m = "CV_INTERVIEW_DATE 2021"; r0int_y=CV_INTERVIEW_DATE_Y; label r0int_y = "CV_INTERVIEW_DATE 2021"; r1int=CV_INTWK_R1; r2int=CV_INTWK_R2; r3int=CV_INTWK_R3; r4int=CV_INTWK_R4; r5int=CV_INTWK_R5; r6int=CV_INTWK_R6; r7int=CV_INTWK_R7; r8int=CV_INTWK_R8; r9int=CV_INTWK_R9; r10int=CV_INTWK_R10; r11int=CV_INTWK_R11; r12int=CV_INTWK_R12; r13int=CV_INTWK_R13; r14int=CV_INTWK_R14; r15int=CV_INTWK_R15; r16int=CV_INTWK_R16; r17int=CV_INTWK_R17; r18int=CV_INTWK_R18; r19int=CV_INTWK_R19; if CV_INTERVIEW_DATE_Y>0 then r0mdy=mdy(CV_INTERVIEW_DATE_M,CV_INTERVIEW_DATE_D,CV_INTERVIEW_DATE_Y); begmdy=mdy(01,01,1980); r0int=intck('week',begmdy,r0mdy)+1; if r0int=. then r0int=-5; label r0int='CV_INTWK_R20'; keep pubid CV_INTERVIEW_DATE_D CV_INTERVIEW_DATE_M CV_INTERVIEW_DATE_Y r0: r1int: r2int: r3int: r4int: r5int: r6int: r7int: r8int: r9int: r10int: r11int: r12int: r13int: r14int: r15int: r16int: r17int: r18int: r19int: ; data emp_week; merge two emp_bday emp_int; by pubid; * Establish dli week; array int_d r1int_d r2int_d r3int_d r4int_d r5int_d r6int_d r7int_d r8int_d r9int_d r10int_d r11int_d r12int_d r13int_d r14int_d r15int_d r16int_d r17int_d r18int_d r19int_d; array int_m r1int_m r2int_m r3int_m r4int_m r5int_m r6int_m r7int_m r8int_m r9int_m r10int_m r11int_m r12int_m r13int_m r14int_m r15int_m r16int_m r17int_m r18int_m r19int_m; array int_y r1int_y r2int_y r3int_y r4int_y r5int_y r6int_y r7int_y r8int_y r9int_y r10int_y r11int_y r12int_y r13int_y r14int_y r15int_y r16int_y r17int_y r18int_y r19int_y; array intwk r1int -- r13int r14int r15int r16int r17int r18int r19int; C=0; do over int_y; C+1; if int_y>0 then do; dli_y=int_y; dli_m=int_m; dli_d=int_d; dliwk=intwk; dli_r=C; end; dlimdy=mdy(dli_m,dli_d,dli_y); end; wkssli=r0int-dliwk; * ostartm = "old" start dates, and startm the start dates with imputed values; array ostartm (j) &R0STAM; array ostartd (j) &R0STAD; array ostarty (j) &R0STAY; array ostopm (j) &R0STOM; array ostopd (j) &R0STOD; array ostopy (j) &R0STOY; array UID (j) &R0UID; array self (j) &R0SEL; array milflag (j) &R0MIL; array startm (j) starm01-starm10; array startd (j) stard01-stard10; array starty (j) stary01-stary10; array stopm (j) stopm01-stopm10; array stopd (j) stopd01-stopd10; array stopy (j) stopy01-stopy10; array smofl (j) smof01-smof10; * dummy=1 when start month imputed; array emofl (j) emof01-emof10; * dummy=1 when stop month imputed; array _strmdy (j) _strmdy01-_strmdy10; array _stpmdy (j) _stpmdy01-_stpmdy10; array _startwk (j) starw01-starw10; array _stopwk (j) stopw01-stopw10; begmdy=mdy(01,01,1980); _1994mdy=mdy(01,01,1994); _1995mdy=mdy(01,01,1995); _1996mdy=mdy(01,01,1996); _1997mdy=mdy(01,01,1997); _1998mdy=mdy(01,01,1998); _1999mdy=mdy(01,01,1999); _2000mdy=mdy(01,01,2000); _2001mdy=mdy(01,01,2001); _2002mdy=mdy(01,01,2002); _2003mdy=mdy(01,01,2003); _2004mdy=mdy(01,01,2004); _2005mdy=mdy(01,01,2005); _2006mdy=mdy(01,01,2006); _2007mdy=mdy(01,01,2007); _2008mdy=mdy(01,01,2008); _2009mdy=mdy(01,01,2009); _2010mdy=mdy(01,01,2010); _2011mdy=mdy(01,01,2011); _2012mdy=mdy(01,01,2012); _2013mdy=mdy(01,01,2013); _2014mdy=mdy(01,01,2014); _2015mdy=mdy(01,01,2015); _2016mdy=mdy(01,01,2016); _2017mdy=mdy(01,01,2017); _2018mdy=mdy(01,01,2018); _2019mdy=mdy(01,01,2019); _2020mdy=mdy(01,01,2020); _2021mdy=mdy(01,01,2021); _2022mdy=mdy(01,01,2022); wk1_1994=intck('week',begmdy,_1994mdy)+1; label wk1_1994='Continuous week 1/1/94'; wk1_1995=intck('week',begmdy,_1995mdy)+1; label wk1_1995='Continuous week 1/1/95'; wk1_1996=intck('week',begmdy,_1996mdy)+1; label wk1_1996='Continuous week 1/1/96'; wk1_1997=intck('week',begmdy,_1997mdy)+1; label wk1_1997='Continuous week 1/1/97'; wk1_1998=intck('week',begmdy,_1998mdy)+1; label wk1_1998='Continuous week 1/1/98'; wk1_1999=intck('week',begmdy,_1999mdy)+1; label wk1_1999='Continuous week 1/1/99'; wk1_2000=intck('week',begmdy,_2000mdy)+1; label wk1_2000='Continuous week 1/1/00'; wk1_2001=intck('week',begmdy,_2001mdy)+1; label wk1_2001='Continuous week 1/1/01'; wk1_2002=intck('week',begmdy,_2002mdy)+1; label wk1_2002='Continuous week 1/1/02'; wk1_2003=intck('week',begmdy,_2003mdy)+1; label wk1_2003='Continuous week 1/1/03'; wk1_2004=intck('week',begmdy,_2004mdy)+1; label wk1_2004='Continuous week 1/1/04'; wk1_2005=intck('week',begmdy,_2005mdy)+1; label wk1_2005='Continuous week 1/1/05'; wk1_2006=intck('week',begmdy,_2006mdy)+1; label wk1_2006='Continuous week 1/1/06'; wk1_2007=intck('week',begmdy,_2007mdy)+1; label wk1_2007='Continuous week 1/1/07'; wk1_2008=intck('week',begmdy,_2008mdy)+1; label wk1_2008='Continuous week 1/1/08'; wk1_2009=intck('week',begmdy,_2009mdy)+1; label wk1_2009='Continuous week 1/1/09'; wk1_2010=intck('week',begmdy,_2010mdy)+1; label wk1_2010='Continuous week 1/1/10'; wk1_2011=intck('week',begmdy,_2011mdy)+1; label wk1_2011='Continuous week 1/1/11'; wk1_2012=intck('week',begmdy,_2012mdy)+1; label wk1_2012='Continuous week 1/1/12'; wk1_2013=intck('week',begmdy,_2013mdy)+1; label wk1_2013='Continuous week 1/1/13'; wk1_2014=intck('week',begmdy,_2014mdy)+1; label wk1_2014='Continuous week 1/1/14'; wk1_2015=intck('week',begmdy,_2015mdy)+1; label wk1_2015='Continuous week 1/1/15'; wk1_2016=intck('week',begmdy,_2016mdy)+1; label wk1_2016='Continuous week 1/1/16'; wk1_2017=intck('week',begmdy,_2017mdy)+1; label wk1_2017='Continuous week 1/1/17'; wk1_2018=intck('week',begmdy,_2018mdy)+1; label wk1_2018='Continuous week 1/1/18'; wk1_2019=intck('week',begmdy,_2019mdy)+1; label wk1_2019='Continuous week 1/1/19'; wk1_2020=intck('week',begmdy,_2020mdy)+1; label wk1_2020='Continuous week 1/1/20'; wk1_2021=intck('week',begmdy,_2021mdy)+1; label wk1_2021='Continuous week 1/1/21'; wk1_2022=intck('week',begmdy,_2022mdy)+1; label wk1_2022='Continuous week 1/1/22'; do j=1 to 10; if uid ge 9701 then do; if ostartm>0 and ostartd>0 and ostarty>1979 then _strmdy=mdy(ostartm,ostartd,ostarty); if ostartm>0 and ostartd in (-1,-2,-3,0) and ostarty>1979 then _strmdy=mdy(ostartm,1,ostarty); if ostartm in (-1,-2,-3) and ostartd>0 and ostarty>1979 then _strmdy=mdy(1,ostartd,ostarty); if ostartm in (-1,-2,-3) and ostartd in (-1,-2,-3,0) and ostarty>1979 then _strmdy=mdy(1,1,ostarty); if ostopm>0 and ostopd>0 and ostopy>1979 then _stpmdy=mdy(ostopm,ostopd,ostopy); if ostopm>0 and ostopd in (-1,-2,-3,0) and ostopy>1979 then _stpmdy=mdy(ostopm,28,ostopy); if ostopm in (-1,-2,-3) and ostopd>0 and ostopy>1979 then _stpmdy=mdy(12,ostopd,ostopy); if ostopm in (-1,-2,-3) and ostopd in (-1,-2,-3,0) and ostopy>1979 then _stpmdy=mdy(12,28,ostopy); *disregard jobs where startdate>stopdate; if _strmdy>0 and _stpmdy>0 and _strmdy>_stpmdy then do; _strmdy=.; _stpmdy=.; end; if _strmdy>0 then _startwk=intck('week',begmdy,_strmdy)+1; if _stpmdy ge dlimdy then _stopwk =intck('week',begmdy,_stpmdy)+1; if 9701 le uid<202100 and _startwk>0 and dliwk>_startwk then _startwk=dliwk; *for jobs with start/stop on/after int set start/stop to week before int; if _stopwk ge r0int then _stopwk=r0int-1; if _startwk ge r0int then _startwk=r0int-1; if ostarty in (-1,-2,-3,-4) then _startwk=-3; if ostopy in (-1,-2,-3,-4) then _stopwk=-3; if _startwk>0 and _stopwk>0 and _startwk>_stopwk then _startwk=_stopwk; end; end; * Define new start and stop dates; do j=1 to 10; if uid ge 9701 then do; startm=ostartm; startd=ostartd; starty=ostarty; stopm=ostopm; stopd=ostopd; stopy=ostopy; end; end; *Impute missing start day to 1, missing stop day to 28, missing start month to 1(Jan), missing stop month to 12(Dec); do over starty; if starty>0 then do; if startd<=0 then startd=1; if startm<=0 then do; startm=1; smofl=1; end; end; end; do over stopy; if stopy>0 then do; if stopd<=0 then stopd=28; if stopm<=0 then do; stopm=12; emofl=1; end; * stop month and day not to exceed the interview date; if stopy=r0int_y and stopm=r0int_m and stopd>r0int_d then stopd=r0int_d; if stopy=r0int_y and stopm>r0int_m then do; stopm=r0int_m; stopd=r0int_d; end; end; end; * All jobs reported in earlier rounds have startdates updated to dli; do j=1 to 10; if 9700-4 then do; if starty=dli_y and startm=dli_m and startd0 then do; startd=dli_d; end; if starty=dli_y and startm0 then do; startm=dli_m; startd=dli_d; end; if starty0 then do; starty=dli_y; startm=dli_m; startd=dli_d; end; end; end; *job start week is Jan.1 of year respondent 18th birthday for self-employed jobs; array bself (j) bself01-bself10; do over _startwk; if milflag ne 1 and self=1 and 0<_startwk<=(ag18jan-1) then do; bself=1; _startwk=ag18jan; starty=birthyr+18; startm=1; startd=1; end; end; *Check for back-reporters, i.e. a new job that begins before the last interview date; do over UID; if milflag ne 1 and uid>202100 then do; if _startwk0 and r19int=dliwk then do; back19=1; end; if _startwk0 and r18int=dliwk then do; back18=1; end; if _startwk0 and r17int=dliwk then do; back17=1; end; if _startwk0 and r16int=dliwk then do; back16=1; end; if _startwk0 and r15int=dliwk then do; back15=1; end; if _startwk0 and r14int=dliwk then do; back14=1; end; if _startwk0 and r13int=dliwk then do; back13=1; end; if _startwk0 and r12int=dliwk then do; back12=1; end; if _startwk0 and r11int=dliwk then do; back11=1; end; if _startwk0 and r10int=dliwk then do; back10=1; end; if _startwk0 and r9int=dliwk then do; back9=1; end; if _startwk0 and r8int=dliwk then do; back8=1; end; if _startwk0 and r7int=dliwk then do; back7=1; end; if _startwk0 and r6int=dliwk then do; back6=1; end; if _startwk0 and r5int=dliwk then do; back5=1; end; if _startwk0 and r4int=dliwk then do; back4=1; end; if _startwk0 and r3int=dliwk then do; back3=1; end; if _startwk0 and r2int=dliwk then do; back2=1; end; if _startwk0 and r1int=dliwk then do; back1=1; end; end; end; array bstart (j) bstar01-bstar10; back=0; do over UID; if milflag ne 1 and uid>202100 and _startwk0 and dliwk>0 then do; back=back+1; bstart=_startwk; end; end; *Find bstar (the earliest nonmilitary start date) for this round. Military jobs not included in starw, earliest start date is back reported job; bstar=min(of bstar01-bstar10); label bstar='earliest start week'; do j=1 to 10; if uid ge 9701 then do; if _startwk>0 and _stopwk>0 and _startwk>_stopwk then do; _startwk=.; _stopwk=.; end; else if _startwk>0 and _stopwk=. then do; _startwk=.; end; else if _startwk=. and _stopwk>0 then do; _stopwk=.; end; end; end; array check (j) check1-check10; do j=1 to 10; if ostopm>0 and ostopy>1979 then do; if ostopy-5; * ENT BEG DATE (SELF-EMP WJGAP),1 ENT BEG DT +1 GAP S-EMP WJGAP,2-21; array sbgdy &E10591201D &E10591402D &E10591403D &E10591404D &E10591405D &E10591406D &E10591407D &E10591408D &E10591409D &E10591410D &E10591411D &E10591412D &E10591413D &E10591414D &E10591415D &E10591416D &E10591417D &E10591418D &E10591419D &E10591420D &E10591421D; array sbgmo &E10591201M &E10591402M &E10591403M &E10591404M &E10591405M &E10591406M &E10591407M &E10591408M &E10591409M &E10591410M &E10591411M &E10591412M &E10591413M &E10591414M &E10591415M &E10591416M &E10591417M &E10591418M &E10591419M &E10591420M &E10591421M; array sbgyr &E10591201Y &E10591402Y &E10591403Y &E10591404Y &E10591405Y &E10591406Y &E10591407Y &E10591408Y &E10591409Y &E10591410Y &E10591411Y &E10591412Y &E10591413Y &E10591414Y &E10591415Y &E10591416Y &E10591417Y &E10591418Y &E10591419Y &E10591420Y &E10591421Y; array segdy &E10591601D &E10591602D &E10591603D &E10591604D &E10591605D &E10591606D &E10591607D &E10591608D &E10591609D &E10591610D &E10591611D &E10591612D &E10591613D &E10591614D &E10591615D &E10591616D &E10591617D &E10591618D &E10591619D &E10591620D &E10591621D; array segmo &E10591601M &E10591602M &E10591603M &E10591604M &E10591605M &E10591606M &E10591607M &E10591608M &E10591609M &E10591610M &E10591611M &E10591612M &E10591613M &E10591614M &E10591615M &E10591616M &E10591617M &E10591618M &E10591619M &E10591620M &E10591621M; array segyr &E10591601Y &E10591602Y &E10591603Y &E10591604Y &E10591605Y &E10591606Y &E10591607Y &E10591608Y &E10591609Y &E10591610Y &E10591611Y &E10591612Y &E10591613Y &E10591614Y &E10591615Y &E10591616Y &E10591617Y &E10591618Y &E10591619Y &E10591620Y &E10591621Y; * ENT BEG M/D/Y WJGAP,1 ENT BEG M/D/Y NEXT WJGAP,2-10; array bgdy &E10220001D &E10240002D &E10240003D &E10240004D &E10240005D &E10240006D &E10240007D &E10240008D &E10240009D &E10240010D &E10240011D &E10240012D &E10240013D &E10240014D &E10240015D &E10240016D &E10240017D &E10240018D &E10240019D &E10240020D &E10240021D; array bgmo &E10220001M &E10240002M &E10240003M &E10240004M &E10240005M &E10240006M &E10240007M &E10240008M &E10240009M &E10240010M &E10240011M &E10240012M &E10240013M &E10240014M &E10240015M &E10240016M &E10240017M &E10240018M &E10240019M &E10240020M &E10240021M; array bgyr &E10220001Y &E10240002Y &E10240003Y &E10240004Y &E10240005Y &E10240006Y &E10240007Y &E10240008Y &E10240009Y &E10240010Y &E10240011Y &E10240012Y &E10240013Y &E10240014Y &E10240015Y &E10240016Y &E10240017Y &E10240018Y &E10240019Y &E10240020Y &E10240021Y; array egdy &E10270001D &E10270002D &E10270003D &E10270004D &E10270005D &E10270006D &E10270007D &E10270008D &E10270009D &E10270010D &E10270011D &E10270012D &E10270013D &E10270014D &E10270015D &E10270016D &E10270017D &E10270018D &E10270019D &E10270020D &E10270021D; array egmo &E10270001M &E10270002M &E10270003M &E10270004M &E10270005M &E10270006M &E10270007M &E10270008M &E10270009M &E10270010M &E10270011M &E10270012M &E10270013M &E10270014M &E10270015M &E10270016M &E10270017M &E10270018M &E10270019M &E10270020M &E10270021M; array egyr &E10270001Y &E10270002Y &E10270003Y &E10270004Y &E10270005Y &E10270006Y &E10270007Y &E10270008Y &E10270009Y &E10270010Y &E10270011Y &E10270012Y &E10270013Y &E10270014Y &E10270015Y &E10270016Y &E10270017Y &E10270018Y &E10270019Y &E10270020Y &E10270021Y; array bgfl &BGFL_01 &BGFL_02 &BGFL_03 &BGFL_04 &BGFL_05 &BGFL_06 &BGFL_07 &BGFL_08 &BGFL_09 &BGFL_10 &BGFL_11 &BGFL_12 &BGFL_13 &BGFL_14 &BGFL_15 &BGFL_16 &BGFL_17 &BGFL_18 &BGFL_19 &BGFL_20 &BGFL_21; array egfl &EGFL_01 &EGFL_02 &EGFL_03 &EGFL_04 &EGFL_05 &EGFL_06 &EGFL_07 &EGFL_08 &EGFL_09 &EGFL_10 &EGFL_11 &EGFL_12 &EGFL_13 &EGFL_14 &EGFL_15 &EGFL_16 &EGFL_17 &EGFL_18 &EGFL_19 &EGFL_20 &EGFL_21; *YEMP SELF EMPLOYED (ROS ITEM); array self &R0sel &R0sel &R0sel &R0sel &R0sel &R0sel &R0sel &R0sel &R0sel &R0sel &R0sel &R0sel &R0sel &R0sel &R0sel &R0sel &R0sel &R0sel &R0sel &R0sel &R0sel; array UID &R0UID &R0UID &R0UID &R0UID &R0UID &R0UID &R0UID &R0UID &R0UID &R0UID &R0UID &R0UID &R0UID &R0UID &R0UID &R0UID &R0UID &R0UID &R0UID &R0UID &R0UID; array milflag &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL; array stary &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY; array starm &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM; array stard &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD; array stopy &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY; array stopm &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM; array stopd &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD; array starw &STARW &STARW &STARW &STARW &STARW &STARW &STARW &STARW &STARW &STARW &STARW &STARW &STARW &STARW &STARW &STARW &STARW &STARW &STARW &STARW &STARW; array stopw &stopW &stopW &stopW &stopW &stopW &stopW &stopW &stopW &stopW &stopW &stopW &stopW &stopW &stopW &stopW &stopW &stopW &stopW &stopW &stopW &stopW; array smof &smof &smof &smof &smof &smof &smof &smof &smof &smof &smof &smof &smof &smof &smof &smof &smof &smof &smof &smof &smof &smof; array emof &emof &emof &emof &emof &emof &emof &emof &emof &emof &emof &emof &emof &emof &emof &emof &emof &emof &emof &emof &emof &emof; * Missing gap days (start and stop) imputed to 1 if only day is missing; do over bgyr; if bgyr>0 then do; if bgmo>0 and bgdy<=0 then bgdy=1; if bgyr=stary and bgmo=starm and bgdy0 then do; if sbgmo>0 and sbgdy<=0 then sbgdy=1; if sbgyr=stary and sbgmo=starm and sbgdy0 then do; if egmo>0 and egdy<=0 then egdy=1; if egyr=stopy and egmo=stopm and stopd>0 and egdy>stopd then egdy=stopd; end; if segyr>0 then do; if segmo>0 and segdy<=0 then segdy=1; if segyr=stopy and segmo=stopm and stopd>0 and segdy>stopd then segdy=stopd; end; end; *Set flag for gap that has invalid dates; do over bgyr; if milflag ne 1 and ((-4 < bgmo < 0) or (-4 < bgyr <0)) then bgfl=1; if milflag ne 1 and ((-4 < sbgmo < 0) or (-4 < sbgyr <0)) then bgfl=1; if milflag ne 1 and ((-4 < egyr < 0) or (-4 < egmo < 0)) then egfl=1; if milflag ne 1 and ((-4 < segyr < 0) or (-4 < segmo < 0)) then egfl=1; end; array _bgmdy &_BGMDY_01 &_BGMDY_02 &_BGMDY_03 &_BGMDY_04 &_BGMDY_05 &_BGMDY_06 &_BGMDY_07 &_BGMDY_08 &_BGMDY_09 &_BGMDY_10 &_BGMDY_11 &_BGMDY_12 &_BGMDY_13 &_BGMDY_14 &_BGMDY_15 &_BGMDY_16 &_BGMDY_17 &_BGMDY_18 &_BGMDY_19 &_BGMDY_20 &_BGMDY_21; array _egmdy &_EGMDY_01 &_EGMDY_02 &_EGMDY_03 &_EGMDY_04 &_EGMDY_05 &_EGMDY_06 &_EGMDY_07 &_EGMDY_08 &_EGMDY_09 &_EGMDY_10 &_EGMDY_11 &_EGMDY_12 &_EGMDY_13 &_EGMDY_14 &_EGMDY_15 &_EGMDY_16 &_EGMDY_17 &_EGMDY_18 &_EGMDY_19 &_EGMDY_20 &_EGMDY_21; array _gdays &_gdays_01 &_gdays_02 &_gdays_03 &_gdays_04 &_gdays_05 &_gdays_06 &_gdays_07 &_gdays_08 &_gdays_09 &_gdays_10 &_gdays_11 &_gdays_12 &_gdays_13 &_gdays_14 &_gdays_15 &_gdays_16 &_gdays_17 &_gdays_18 &_gdays_19 &_gdays_20 &_gdays_21; array _bgap &BGAP_01 &BGAP_02 &BGAP_03 &BGAP_04 &BGAP_05 &BGAP_06 &BGAP_07 &BGAP_08 &BGAP_09 &BGAP_10 &BGAP_11 &BGAP_12 &BGAP_13 &BGAP_14 &BGAP_15 &BGAP_16 &BGAP_17 &BGAP_18 &BGAP_19 &BGAP_20 &BGAP_21; array _egap &EGAP_01 &EGAP_02 &EGAP_03 &EGAP_04 &EGAP_05 &EGAP_06 &EGAP_07 &EGAP_08 &EGAP_09 &EGAP_10 &EGAP_11 &EGAP_12 &EGAP_13 &EGAP_14 &EGAP_15 &EGAP_16 &EGAP_17 &EGAP_18 &EGAP_19 &EGAP_20 &EGAP_21; begmdy=mdy(01,01,1980); dlimdy=mdy(dli_m,dli_d,dli_y); do over bgyr; if milflag ne 1 and uid ge 9701 then do; *Count the number of days from January 1, 1960 (=0), to the gap begin and end dates; if bgmo>0 and bgdy>0 and bgyr>1979 then _bgmdy=mdy(bgmo,bgdy,bgyr); if sbgmo>0 and sbgdy>0 and sbgyr>1979 then _bgmdy=mdy(sbgmo,sbgdy,sbgyr); *Fill missing gap begin day with 1; if bgmo>0 and bgdy in (-1,-2,-3) and bgyr>1979 then _bgmdy=mdy(bgmo,1,bgyr); if sbgmo>0 and sbgdy in (-1,-2,-3) and sbgyr>1979 then _bgmdy=mdy(sbgmo,1,sbgyr); if egmo>0 and egdy>0 and egyr>1979 then _egmdy=mdy(egmo,egdy,egyr); if segmo>0 and segdy>0 and segyr>1979 then _egmdy=mdy(segmo,segdy,segyr); *Fill missing gap end day with 1; if egmo>0 and egdy in (-1,-2,-3) and egyr>1979 then _egmdy=mdy(egmo,1,egyr); if segmo>0 and segdy in (-1,-2,-3) and segyr>1979 then _egmdy=mdy(segmo,1,segyr); *And count the number of days in the gap; if _egmdy>0 and _bgmdy>0 then _gdays=_egmdy-_bgmdy+1; *Count the number of weeks from Jan 1 1980 to gap begin week and to gap end week to set the week numbers; if _bgmdy>0 then _bgap=intck('week',begmdy,_bgmdy)+1; if _egmdy>0 then _egap =intck('week',begmdy,_egmdy)+1; *Omit gap start and stop dates for gaps less than one work week (5 days); if _gdays ne . and _gdays<5 then do; _bgap=.; _egap=.; end; *Recode the gap begin week and the gap end week to eliminate partial weeks working; if _egap>_bgap+1 then _bgap=_bgap+1; if _egap>_bgap then _egap=_egap-1; *disregard any entire gap before/after job; if _bgap>0 and (_bgap>stopw or _bgap>r0int) then do; _bgap=.; _egap=.; bgfl=.; egfl=.; end; if _egap>0 and (_egap0 and _egap>stopw then _egap=stopw; end; end; run; data emp_countweeks; merge two emp_bday emp_int emp_week emp_gaps; by pubid; if r0int>-5; *Define rd0wk as maximum of dliwk and age14wk, for employment activity this round; rd0wk=max(dliwk,age14wk); array job1wks (i) _1-_892 w1_893-w1_2231; array job2wks (i) _1-_892 w2_893-w2_2231; array job3wks (i) _1-_892 w3_893-w3_2231; array job4wks (i) _1-_892 w4_893-w4_2231; array job5wks (i) _1-_892 w5_893-w5_2231; array job6wks (i) _1-_892 w6_893-w6_2231; array job7wks (i) _1-_892 w7_893-w7_2231; array job8wks (i) _1-_892 w8_893-w8_2231; array job9wks (i) _1-_892 w9_893-w9_2231; array job10wks (i) _1-_892 w10_893-w10_2231; *** TOTAL WEEKS WORKED; array starf starf_1-starf_10; array stopf stopf_1-stopf_10; array starw &starw; array stopw &stopw; array stary &R0STAY; array stopy &R0STOY; array smof &smof; array emof &emof; array bself bself01-bself10; array endwk endwk01-endwk10; array begwk begwk01-begwk10; array bweek1 &bgap_01; array eweek1 &egap_01; array bflag1 &bgfl_01; array eflag1 &egfl_01; array bweek2 &bgap_02; array eweek2 &egap_02; array bflag2 &bgfl_02; array eflag2 &egfl_02; array bweek3 &bgap_03; array eweek3 &egap_03; array bflag3 &bgfl_03; array eflag3 &egfl_03; array bweek4 &bgap_04; array eweek4 &egap_04; array bflag4 &bgfl_04; array eflag4 &egfl_04; array bweek5 &bgap_05; array eweek5 &egap_05; array bflag5 &bgfl_05; array eflag5 &egfl_05; array bweek6 &bgap_06; array eweek6 &egap_06; array bflag6 &bgfl_06; array eflag6 &egfl_06; array bweek7 &bgap_07; array eweek7 &egap_07; array bflag7 &bgfl_07; array eflag7 &egfl_07; array bweek8 &bgap_08; array eweek8 &egap_08; array bflag8 &bgfl_08; array eflag8 &egfl_08; array bweek9 &bgap_09; array eweek9 &egap_09; array bflag9 &bgfl_09; array eflag9 &egfl_09; array bweek10 &bgap_10; array eweek10 &egap_10; array bflag10 &bgfl_10; array eflag10 &egfl_10; array bweek11 &bgap_11; array eweek11 &egap_11; array bflag11 &bgfl_11; array eflag11 &egfl_11; array bweek12 &bgap_12; array eweek12 &egap_12; array bflag12 &bgfl_12; array eflag12 &egfl_12; array bweek13 &bgap_13; array eweek13 &egap_13; array bflag13 &bgfl_13; array eflag13 &egfl_13; array bweek14 &bgap_14; array eweek14 &egap_14; array bflag14 &bgfl_14; array eflag14 &egfl_14; array bweek15 &bgap_15; array eweek15 &egap_15; array bflag15 &bgfl_15; array eflag15 &egfl_15; array bweek16 &bgap_16; array eweek16 &egap_16; array bflag16 &bgfl_16; array eflag16 &egfl_16; array bweek17 &bgap_17; array eweek17 &egap_17; array bflag17 &bgfl_17; array eflag17 &egfl_17; array bweek18 &bgap_18; array eweek18 &egap_18; array bflag18 &bgfl_18; array eflag18 &egfl_18; array bweek19 &bgap_19; array eweek19 &egap_19; array bflag19 &bgfl_19; array eflag19 &egfl_19; array bweek20 &bgap_20; array eweek20 &egap_20; array bflag20 &bgfl_20; array eflag20 &egfl_20; array bweek21 &bgap_21; array eweek21 &egap_21; array bflag21 &bgfl_21; array eflag21 &egfl_21; array milflag &R0mil; array jobwks job1wks job2wks job3wks job4wks job5wks job6wks job7wks job8wks job9wks job10wks; do over starf; if milflag=1 then do; starw=.; stopw=.; end; if starw=-3 then do; starw=rd0wk; starf=1; end; if stopw=-3 then do; stopw=r0int-1; stopf=1; end; if starw ne . and smof=1 and bself ne 1 then do; starf=1;*smof: bad start month flag; if stary=1995 then begwk=835; if stary=1996 then begwk=887; if stary=1997 then begwk=939; if stary=1998 then begwk=991; if stary=1999 then begwk=1043; if stary=2000 then begwk=1096; if stary=2001 then begwk=1148; if stary=2002 then begwk=1200; if stary=2003 then begwk=1252; if stary=2004 then begwk=1304; if stary=2005 then begwk=1357; if stary=2006 then begwk=1409; if stary=2007 then begwk=1461; if stary=2008 then begwk=1513; if stary=2009 then begwk=1565; if stary=2010 then begwk=1617; if stary=2011 then begwk=1670; if stary=2012 then begwk=1722; if stary=2013 then begwk=1774; if stary=2014 then begwk=1826; if stary=2015 then begwk=1878; if stary=2016 then begwk=1931; if stary=2017 then begwk=1983; if stary=2018 then begwk=2035; if stary=2019 then begwk=2087; if stary=2020 then begwk=2139; if stary=2021 then begwk=2191; end; if stopw ne . and emof=1 then do; stopf=1;*emof: bad stop month flag; if stopy=1997 then endwk=888; if stopy=1998 then endwk=940; if stopy=1999 then endwk=992; if stopy=2000 then endwk=1044; if stopy=2001 then endwk=1097; if stopy=2002 then endwk=1149; if stopy=2003 then endwk=1201; if stopy=2004 then endwk=1253; if stopy=2005 then endwk=1305; if stopy=2006 then endwk=1358; if stopy=2007 then endwk=1410; if stopy=2008 then endwk=1462; if stopy=2009 then endwk=1514; if stopy=2010 then endwk=1566; if stopy=2011 then endwk=1618; if stopy=2012 then endwk=1671; if stopy=2013 then endwk=1723; if stopy=2014 then endwk=1775; if stopy=2015 then endwk=1827; if stopy=2016 then endwk=1879; if stopy=2017 then endwk=1932; if stopy=2018 then endwk=1984; if stopy=2019 then endwk=2036; if stopy=2020 then endwk=2088; if stopy=2021 then endwk=2140; if stopy=2022 then endwk=2192; if endwk>r0int-1 then endwk=r0int-1; end; end; do over starw; do i=893 to 2231; jobwks=0; end; if starw>0 and stopw>0 then do; do i=(starw) to (stopw); jobwks=1; end; end; end; %macro ctwksgaps; do over bweek&g.;*bweek=bgap: begin gap, eweek=egap: end gap; if bweek&g.>0 and eweek&g.>0 then do; do i=(bweek&g.) to (eweek&g.); jobwks=0; end; end; if starw ne . and bflag&g.=1 and eweek&g.>0 then do; do i=(starw) to (eweek&g.); jobwks=-3; end; end; if stopw ne . and bweek&g.>0 and eflag&g.=1 then do; do i=(bweek&g.) to (stopw); jobwks=-3; end; end; if starw ne . and bflag&g.=1 and eflag&g.=1 then do; do i=(starw) to (stopw); jobwks=-3; end; end; end; %mend ctwksgaps; %let g=1; %ctwksgaps %let g=2; %ctwksgaps %let g=3; %ctwksgaps %let g=4; %ctwksgaps %let g=5; %ctwksgaps %let g=6; %ctwksgaps %let g=7; %ctwksgaps %let g=8; %ctwksgaps %let g=9; %ctwksgaps %let g=10; %ctwksgaps %let g=11; %ctwksgaps %let g=12; %ctwksgaps %let g=13; %ctwksgaps %let g=14; %ctwksgaps %let g=15; %ctwksgaps %let g=16; %ctwksgaps %let g=17; %ctwksgaps %let g=18; %ctwksgaps %let g=19; %ctwksgaps %let g=20; %ctwksgaps %let g=21; %ctwksgaps do over starf; if starf=1 then do; if stopw>0 | begwk>0 | bweek1>1 | bweek2>1 | eweek1>0 | eweek2>0 then do; do i=(starw) to min(stopw,begwk,bweek1-1,bweek2-1,eweek1+1,eweek2+1); jobwks=-3; end; end; end; if stopf=1 then do; do i=max(starw,endwk,bweek1-1,bweek2-1,eweek1+1,eweek2+1) to (stopw); jobwks=-3; end; end; end; drop _1-_892; data emp29_numwks(keep= pubid r0wks97-r0wks99 r0wks00-r0wks22 r0swks97-r0swks99 r0swks00-r0swks22 r0ewks97-r0ewks99 r0ewks00-r0ewks22 wks893-wks2231 swks893-swks2231 ewks893-ewks2231); merge two emp_bday emp_int emp_week emp_countweeks; by pubid; if r0int ne -5; array job1wks (i) _1-_892 w1_893-w1_2231; array job2wks (i) _1-_892 w2_893-w2_2231; array job3wks (i) _1-_892 w3_893-w3_2231; array job4wks (i) _1-_892 w4_893-w4_2231; array job5wks (i) _1-_892 w5_893-w5_2231; array job6wks (i) _1-_892 w6_893-w6_2231; array job7wks (i) _1-_892 w7_893-w7_2231; array job8wks (i) _1-_892 w8_893-w8_2231; array job9wks (i) _1-_892 w9_893-w9_2231; array job10wks (i) _1-_892 w10_893-w10_2231; array alljobs (i) _1-_892 wks893-wks2231; array selfjobs (i) _1-_892 swks893-swks2231; array empjobs (i) _1-_892 ewks893-ewks2231; array self &R0sel; array jobwks job1wks job2wks job3wks job4wks job5wks job6wks job7wks job8wks job9wks job10wks; do i=893 to 2231; alljobs=0; selfjobs=0; empjobs=0; end; do over self; do i=893 to 2231; if jobwks=1 then alljobs=jobwks; if jobwks=1 and self=1 then selfjobs=jobwks; if jobwks=1 and self=0 then empjobs=jobwks; if jobwks=-3 and alljobs=0 then alljobs=jobwks; if jobwks=-3 and selfjobs=0 and self=1 then selfjobs=jobwks; if jobwks=-3 and empjobs=0 and self=0 then empjobs=jobwks; end; end; ********************************************************** ** Calculate cumulative weeks on all jobs for each year ** **********************************************************; array r0wks r0wks97-r0wks99 r0wks00- r0wks22; array r0swks r0swks97-r0swks99 r0swks00-r0swks22; array r0ewks r0ewks97-r0ewks99 r0ewks00-r0ewks22; * Initialize each annual cv; do over r0wks; r0wks=0; r0swks=0; r0ewks=0; end; %macro emp29a; do i=&cw ; if i ge rd0wk and i0 then bcount=0; label bcount='EMP_BK_WKS_'; if bstar>0 then do; if bstar>age14wk then do; do i=bstar to rd0wk-1; if alljobs=1 then bcount=bcount+1; end; do i=bstar to rd0wk-1; if alljobs=-3 then bcount=-3; end; end; if bstar<=age14wk then do; do i=age14wk to rd0wk-1; if alljobs=1 then bcount=bcount+1; end; do i=age14wk to rd0wk-1; if alljobs=-3 then bcount=-3; end; end; end; data emp31_jobwks(keep=pubid r0w97_1 -- r0w22_10); merge emp_int emp_countweeks; by pubid; if r0int ne -5; ** Number of weeks worked since dli at each current job by year ** eg: r0w06_3 is number of weeks since dli worked in 2006 on job3; array job1wks (i) _1-_892 w1_893-w1_2231; array job2wks (i) _1-_892 w2_893-w2_2231; array job3wks (i) _1-_892 w3_893-w3_2231; array job4wks (i) _1-_892 w4_893-w4_2231; array job5wks (i) _1-_892 w5_893-w5_2231; array job6wks (i) _1-_892 w6_893-w6_2231; array job7wks (i) _1-_892 w7_893-w7_2231; array job8wks (i) _1-_892 w8_893-w8_2231; array job9wks (i) _1-_892 w9_893-w9_2231; array job10wks (i) _1-_892 w10_893-w10_2231; array r0wks97 r0w97_1-r0w97_10; array r0wks98 r0w98_1-r0w98_10; array r0wks99 r0w99_1-r0w99_10; array r0wks00 r0w00_1-r0w00_10; array r0wks01 r0w01_1-r0w01_10; array r0wks02 r0w02_1-r0w02_10; array r0wks03 r0w03_1-r0w03_10; array r0wks04 r0w04_1-r0w04_10; array r0wks05 r0w05_1-r0w05_10; array r0wks06 r0w06_1-r0w06_10; array r0wks07 r0w07_1-r0w07_10; array r0wks08 r0w08_1-r0w08_10; array r0wks09 r0w09_1-r0w09_10; array r0wks10 r0w10_1-r0w10_10; array r0wks11 r0w11_1-r0w11_10; array r0wks12 r0w12_1-r0w12_10; array r0wks13 r0w13_1-r0w13_10; array r0wks14 r0w14_1-r0w14_10; array r0wks15 r0w15_1-r0w15_10; array r0wks16 r0w16_1-r0w16_10; array r0wks17 r0w17_1-r0w17_10; array r0wks18 r0w18_1-r0w18_10; array r0wks19 r0w19_1-r0w19_10; array r0wks20 r0w20_1-r0w20_10; array r0wks21 r0w21_1-r0w21_10; array r0wks22 r0w22_1-r0w22_10; array jobwks job1wks job2wks job3wks job4wks job5wks job6wks job7wks job8wks job9wks job10wks; %macro emp31; do over r0wks&yr; r0wks&yr =0; do i=&cw ; if i ge rd0wk and i=e38002 then rghrs=rghrsb-e38002; else rghrs=-3; end; if e38000b lt 0 and e38000b not in (-4,-5,.) then rghrs=-3; if e38102 in (1,3) and e38103 not in (.,-4,-5) then rghrs=e38103; if e38102 lt 0 and e38102 not in (-4,-5, .) then rghrs=-3; if e37904 > -4 then rghrs=e37904; if e59901 > -4 then rghrs=e59901; end; ***** Overtime Hours Per Week; do k=1 to 10; if e24501 not in (.,-4,-5) then othrs=e24501; if e34403 not in (.,-4,-5) then othrs=e34403; if e88501 not in (.,-4,-5) then othrs=e88501; if e98403 not in (.,-4,-5) then othrs=e98403; if e38002 not in (.,-4,-5) then othrs=e38002; if e38105 not in (.,-4,-5) then othrs=e38105; else if e38102 lt 0 and e38102 not in (.,-4,-5) then othrs=-3; end; ***** Total Hours Per Week; do k=1 to 10; if rghrs in (-1,-2,-3) or othrs in (-1,-2,-3) then hours=-3; else if rghrs ge 0 and othrs ge 0 then hours=rghrs + othrs; end; ***** Hours Per Week on back reported jobs; if back>1 then bhours=-3; array br (k) bstar01--bstar10; do k=1 to 10; if back=1 and br>0 then bhours=hours; end; ***************************************************************** ** Calculate cumulative hours on each job for each year worked** *****************************************************************; %macro emp33; array wks&yr (k) r0w&yr._1-r0w&yr._10; array ah&yr (k) ah&yr._1- ah&yr._10; array sah&yr (k) sah&yr._1-sah&yr._10; array eah&yr (k) eah&yr._1-eah&yr._10; do k=1 to 10; ah&yr =0; sah&yr =0; eah&yr =0; if hours ge 0 and wks&yr ge 0 then ah&yr =hours*wks&yr ; else if wks&yr =-3 or (hours in (-1,-2,-3) and wks&yr ne 0) then ah&yr =-3; if self=1 then sah&yr =ah&yr ; if self=0 then eah&yr =ah&yr ; end; r0hrs&yr =0; r0shrs&yr =0; r0ehrs&yr =0; do k=1 to 10; if ah&yr ge 0 then r0hrs&yr = r0hrs&yr + ah&yr ; if sah&yr ge 0 then r0shrs&yr = r0shrs&yr + sah&yr ; if eah&yr ge 0 then r0ehrs&yr = r0ehrs&yr + eah&yr ; end; do k=1 to 10; if ah&yr =-3 then r0hrs&yr = -3; if sah&yr =-3 then r0shrs&yr = -3; if eah&yr =-3 then r0ehrs&yr = -3; end; %mend emp33; %let yr=97; %emp33 %let yr=98; %emp33 %let yr=99; %emp33 %let yr=00; %emp33 %let yr=01; %emp33 %let yr=02; %emp33 %let yr=03; %emp33 %let yr=04; %emp33 %let yr=05; %emp33 %let yr=06; %emp33 %let yr=07; %emp33 %let yr=08; %emp33 %let yr=09; %emp33 %let yr=10; %emp33 %let yr=11; %emp33 %let yr=12; %emp33 %let yr=13; %emp33 %let yr=14; %emp33 %let yr=15; %emp33 %let yr=16; %emp33 %let yr=17; %emp33 %let yr=18; %emp33 %let yr=19; %emp33 %let yr=20; %emp33 %let yr=21; %emp33 %let yr=22; %emp33 run; data emp34_wksage14; merge emp_bday emp_int emp_week emp_countweeks emp29_numwks; by pubid; if r0int ne -5; *r0wksage14 is number of weeks worked (all jobs) since dli to age20/r0int; *r0wksage20 is number of weeks worked (all jobs) since dli/age20 to r0int; array alljobs (i) _1-_892 wks893-wks2231; array empjobs (i) _1-_892 ewks893-ewks2231; end14wk=min(age20wk-1, r0int-1); if end14wk ge rd0wk then do; r0wksage14=0; r0ewksage14=0; do i=rd0wk to end14wk; if alljobs=1 then r0wksage14=r0wksage14+1; if empjobs=1 then r0ewksage14=r0ewksage14+1; end; do i=rd0wk to end14wk; if alljobs=-3 then r0wksage14=-3; if empjobs=-3 then r0ewksage14=-3; end; end; rd20wk=max(dliwk,age20wk); r0wksage20=0; r0ewksage20=0; do i=rd20wk to (r0int-1); if alljobs=1 then r0wksage20=r0wksage20+1; if empjobs=1 then r0ewksage20=r0ewksage20+1; end; do i=rd20wk to (r0int-1); if alljobs=-3 then r0wksage20=-3; if empjobs=-3 then r0ewksage20=-3; end; data emp35_hrsage14(keep=pubid r0hrsage14 r0ehrsage14 r0hrsage20 r0ehrsage20); merge two emp_bday emp_int emp_week emp_countweeks emp33_anhours(keep=pubid hours01-hours10); by pubid; if r0int ne -5; array job1wks (i) _1-_892 w1_893-w1_2231; array job2wks (i) _1-_892 w2_893-w2_2231; array job3wks (i) _1-_892 w3_893-w3_2231; array job4wks (i) _1-_892 w4_893-w4_2231; array job5wks (i) _1-_892 w5_893-w5_2231; array job6wks (i) _1-_892 w6_893-w6_2231; array job7wks (i) _1-_892 w7_893-w7_2231; array job8wks (i) _1-_892 w8_893-w8_2231; array job9wks (i) _1-_892 w9_893-w9_2231; array job10wks (i) _1-_892 w10_893-w10_2231; array hours hours01-hours10; array self &R0sel; array wks14 wks1401-wks1410; array hrs14 hrs1401-hrs1410; array ehrs14 ehrs1401-ehrs1410; array wks20 wks2001-wks2010; array hrs20 hrs2001-hrs2010; array ehrs20 ehrs2001-ehrs2010; array jobwks job1wks job2wks job3wks job4wks job5wks job6wks job7wks job8wks job9wks job10wks; end14wk=min(age20wk-1, r0int-1); * The number of hours worked before age20; if end14wk ge rd0wk then do; r0hrsage14=0; r0ehrsage14=0; do over wks14; wks14=0; hrs14=0; ehrs14=0; do i=rd0wk to end14wk; if jobwks=1 then wks14=wks14+1; end; do i=rd0wk to end14wk; if jobwks=-3 then wks14=-3; end; end; do over hours; if hours ge 0 and wks14 ge 0 then hrs14=hours*wks14; else if wks14=-3 or (hours in (-1,-2,-3) and wks14 ne 0) then hrs14=-3; if self=0 then ehrs14=hrs14; end; do over hrs14; if hrs14 ge 0 then r0hrsage14 = r0hrsage14 + hrs14; if ehrs14 ge 0 then r0ehrsage14 = r0ehrsage14 + ehrs14; end; do over hrs14; if hrs14=-3 then r0hrsage14=-3; if ehrs14=-3 then r0ehrsage14=-3; end; end; * The number of hours worked since age 20; rd20wk=max(dliwk,age20wk); r0hrsage20=0; r0ehrsage20=0; do over wks20; wks20=0; hrs20=0; ehrs20=0; do i=rd20wk to (r0int-1); if jobwks=1 then wks20=wks20+1; end; do i=rd20wk to (r0int-1); if jobwks=-3 then wks20=-3; end; end; do over hrs20; if hours ge 0 and wks20 ge 0 then hrs20=hours*wks20; else if wks20=-3 or (hours in (-1,-2,-3) and wks20 ne 0) then hrs20=-3; if self=0 then ehrs20=hrs20; end; do over hrs20; if hrs20 ge 0 then r0hrsage20 = r0hrsage20 + hrs20; if ehrs20 ge 0 then r0ehrsage20 = r0ehrsage20 + ehrs20; end; do over hrs20; if hrs20=-3 then r0hrsage20=-3; if ehrs20=-3 then r0ehrsage20=-3; end; data emp36_numjobs; merge two emp_bday emp_int emp_countweeks r20.empstatus; by pubid; if r0int ne -5; ********************************************************************** ** Number of NEW jobs held during year ** ** (conditional on having worked at least 1 week during that year) ** **********************************************************************; array job1wks (i) _1-_892 w1_893-w1_2231; array job2wks (i) _1-_892 w2_893-w2_2231; array job3wks (i) _1-_892 w3_893-w3_2231; array job4wks (i) _1-_892 w4_893-w4_2231; array job5wks (i) _1-_892 w5_893-w5_2231; array job6wks (i) _1-_892 w6_893-w6_2231; array job7wks (i) _1-_892 w7_893-w7_2231; array job8wks (i) _1-_892 w8_893-w8_2231; array job9wks (i) _1-_892 w9_893-w9_2231; array job10wks (i) _1-_892 w10_893-w10_2231; array empstat (i) _1-_730 EMP_STATUS_1994_01-EMP_STATUS_1994_53 EMP_STATUS_1995_01-EMP_STATUS_1995_52 EMP_STATUS_1996_01-EMP_STATUS_1996_52 EMP_STATUS_1997_01-EMP_STATUS_1997_52 EMP_STATUS_1998_01-EMP_STATUS_1998_52 EMP_STATUS_1999_01-EMP_STATUS_1999_52 EMP_STATUS_2000_01-EMP_STATUS_2000_53 EMP_STATUS_2001_01-EMP_STATUS_2001_52 EMP_STATUS_2002_01-EMP_STATUS_2002_52 EMP_STATUS_2003_01-EMP_STATUS_2003_52 EMP_STATUS_2004_01-EMP_STATUS_2004_52 EMP_STATUS_2005_01-EMP_STATUS_2005_53 EMP_STATUS_2006_01-EMP_STATUS_2006_52 EMP_STATUS_2007_01-EMP_STATUS_2007_52 EMP_STATUS_2008_01-EMP_STATUS_2008_52 EMP_STATUS_2009_01-EMP_STATUS_2009_52 EMP_STATUS_2010_01-EMP_STATUS_2010_52 EMP_STATUS_2011_01-EMP_STATUS_2011_53 EMP_STATUS_2012_01-EMP_STATUS_2012_52 EMP_STATUS_2013_01-EMP_STATUS_2013_52 EMP_STATUS_2014_01-EMP_STATUS_2014_52 EMP_STATUS_2015_01-EMP_STATUS_2015_52 EMP_STATUS_2016_01-EMP_STATUS_2016_53 EMP_STATUS_2017_01-EMP_STATUS_2017_52 EMP_STATUS_2018_01-EMP_STATUS_2018_52 EMP_STATUS_2019_01-EMP_STATUS_2019_52 EMP_STATUS_2020_01-EMP_STATUS_2020_29 _2117-_2231; array dual_2 (i) _1-_730 _731-_750 EMP_DUAL_2_1994_21-EMP_DUAL_2_1994_53 EMP_DUAL_2_1995_01-EMP_DUAL_2_1995_52 EMP_DUAL_2_1996_01-EMP_DUAL_2_1996_52 EMP_DUAL_2_1997_01-EMP_DUAL_2_1997_52 EMP_DUAL_2_1998_01-EMP_DUAL_2_1998_52 EMP_DUAL_2_1999_01-EMP_DUAL_2_1999_52 EMP_DUAL_2_2000_01-EMP_DUAL_2_2000_53 EMP_DUAL_2_2001_01-EMP_DUAL_2_2001_52 EMP_DUAL_2_2002_01-EMP_DUAL_2_2002_52 EMP_DUAL_2_2003_01-EMP_DUAL_2_2003_52 EMP_DUAL_2_2004_01-EMP_DUAL_2_2004_52 EMP_DUAL_2_2005_01-EMP_DUAL_2_2005_53 EMP_DUAL_2_2006_01-EMP_DUAL_2_2006_52 EMP_DUAL_2_2007_01-EMP_DUAL_2_2007_52 EMP_DUAL_2_2008_01-EMP_DUAL_2_2008_52 EMP_DUAL_2_2009_01-EMP_DUAL_2_2009_52 EMP_DUAL_2_2010_01-EMP_DUAL_2_2010_52 EMP_DUAL_2_2011_01-EMP_DUAL_2_2011_53 EMP_DUAL_2_2012_01-EMP_DUAL_2_2012_52 EMP_DUAL_2_2013_01-EMP_DUAL_2_2013_52 EMP_DUAL_2_2014_01-EMP_DUAL_2_2014_52 EMP_DUAL_2_2015_01-EMP_DUAL_2_2015_52 EMP_DUAL_2_2016_01-EMP_DUAL_2_2016_53 EMP_DUAL_2_2017_01-EMP_DUAL_2_2017_52 EMP_DUAL_2_2018_01-EMP_DUAL_2_2018_52 EMP_DUAL_2_2019_01-EMP_DUAL_2_2019_52 EMP_DUAL_2_2020_01-EMP_DUAL_2_2020_27 _2115-_2231; array dual_3 (i) _1-_730 _731-_795 EMP_DUAL_3_1995_13-EMP_DUAL_3_1995_52 EMP_DUAL_3_1996_01-EMP_DUAL_3_1996_52 EMP_DUAL_3_1997_01-EMP_DUAL_3_1997_52 EMP_DUAL_3_1998_01-EMP_DUAL_3_1998_52 EMP_DUAL_3_1999_01-EMP_DUAL_3_1999_52 EMP_DUAL_3_2000_01-EMP_DUAL_3_2000_53 EMP_DUAL_3_2001_01-EMP_DUAL_3_2001_52 EMP_DUAL_3_2002_01-EMP_DUAL_3_2002_52 EMP_DUAL_3_2003_01-EMP_DUAL_3_2003_52 EMP_DUAL_3_2004_01-EMP_DUAL_3_2004_52 EMP_DUAL_3_2005_01-EMP_DUAL_3_2005_53 EMP_DUAL_3_2006_01-EMP_DUAL_3_2006_52 EMP_DUAL_3_2007_01-EMP_DUAL_3_2007_52 EMP_DUAL_3_2008_01-EMP_DUAL_3_2008_52 EMP_DUAL_3_2009_01-EMP_DUAL_3_2009_52 EMP_DUAL_3_2010_01-EMP_DUAL_3_2010_52 EMP_DUAL_3_2011_01-EMP_DUAL_3_2011_53 EMP_DUAL_3_2012_01-EMP_DUAL_3_2012_52 EMP_DUAL_3_2013_01-EMP_DUAL_3_2013_52 EMP_DUAL_3_2014_01-EMP_DUAL_3_2014_52 EMP_DUAL_3_2015_01-EMP_DUAL_3_2015_52 EMP_DUAL_3_2016_01-EMP_DUAL_3_2016_53 EMP_DUAL_3_2017_01-EMP_DUAL_3_2017_52 EMP_DUAL_3_2018_01-EMP_DUAL_3_2018_52 EMP_DUAL_3_2019_01-EMP_DUAL_3_2019_52 EMP_DUAL_3_2020_01-EMP_DUAL_3_2020_10 _2098-_2109 EMP_DUAL_3_2020_23 _2111-_2113 EMP_DUAL_3_2020_27 _2115-_2231; array dual_4 (i) _1-_730 _731-_843 EMP_DUAL_4_1996_09-EMP_DUAL_4_1996_36 _872-_887 _888-_894 EMP_DUAL_4_1997_08 _896 _897 EMP_DUAL_4_1997_11-EMP_DUAL_4_1997_35 _923-_939 _940 EMP_DUAL_4_1998_02-EMP_DUAL_4_1998_20 _960 _961 EMP_DUAL_4_1998_23 _963-_973 EMP_DUAL_4_1998_35 _975-_1013 EMP_DUAL_4_1999_23-EMP_DUAL_4_1999_31 _1023-_1030 EMP_DUAL_4_1999_40 _1032-_1037 EMP_DUAL_4_1999_47-EMP_DUAL_4_1999_49 _1041-_1043 EMP_DUAL_4_2000_01-EMP_DUAL_4_2000_07 _1051-_1056 EMP_DUAL_4_2000_14 _1058-_1061 EMP_DUAL_4_2000_19-EMP_DUAL_4_2000_53 EMP_DUAL_4_2001_01-EMP_DUAL_4_2001_52 EMP_DUAL_4_2002_01-EMP_DUAL_4_2002_52 EMP_DUAL_4_2003_01-EMP_DUAL_4_2003_52 EMP_DUAL_4_2004_01-EMP_DUAL_4_2004_52 EMP_DUAL_4_2005_01-EMP_DUAL_4_2005_53 EMP_DUAL_4_2006_01-EMP_DUAL_4_2006_52 EMP_DUAL_4_2007_01-EMP_DUAL_4_2007_52 EMP_DUAL_4_2008_01-EMP_DUAL_4_2008_52 EMP_DUAL_4_2009_01-EMP_DUAL_4_2009_52 EMP_DUAL_4_2010_01-EMP_DUAL_4_2010_52 EMP_DUAL_4_2011_01-EMP_DUAL_4_2011_53 EMP_DUAL_4_2012_01-EMP_DUAL_4_2012_52 EMP_DUAL_4_2013_01-EMP_DUAL_4_2013_52 EMP_DUAL_4_2014_01-EMP_DUAL_4_2014_52 EMP_DUAL_4_2015_01-EMP_DUAL_4_2015_49 _1876 EMP_DUAL_4_2015_51 EMP_DUAL_4_2015_52 EMP_DUAL_4_2016_01-EMP_DUAL_4_2016_53 EMP_DUAL_4_2017_01-EMP_DUAL_4_2017_52 EMP_DUAL_4_2018_01-EMP_DUAL_4_2018_52 EMP_DUAL_4_2019_01-EMP_DUAL_4_2019_52 EMP_DUAL_4_2020_01-EMP_DUAL_4_2020_02 _2090-_2231; array dual_5 (i) _1-_730 _731-_1030 EMP_DUAL_5_1999_40 _1032-_1101 EMP_DUAL_5_2001_06-EMP_DUAL_5_2001_52 EMP_DUAL_5_2002_01-EMP_DUAL_5_2002_52 EMP_DUAL_5_2003_01-EMP_DUAL_5_2003_23 _1224-_1226 EMP_DUAL_5_2003_27-EMP_DUAL_5_2003_39 _1240-_1244 EMP_DUAL_5_2003_45-EMP_DUAL_5_2003_52 EMP_DUAL_5_2004_01-EMP_DUAL_5_2004_06 _1259-_1270 EMP_DUAL_5_2004_19-EMP_DUAL_5_2004_30 _1283-_1335 EMP_DUAL_5_2005_32-EMP_DUAL_5_2005_41 _1346-_1352 EMP_DUAL_5_2005_49 _1354-_1368 EMP_DUAL_5_2006_12 EMP_DUAL_5_2006_13 _1371-_1379 EMP_DUAL_5_2006_23-EMP_DUAL_5_2006_52 EMP_DUAL_5_2007_01-EMP_DUAL_5_2007_52 EMP_DUAL_5_2008_01-EMP_DUAL_5_2008_33 _1495 _1496 EMP_DUAL_5_2008_36-EMP_DUAL_5_2008_52 EMP_DUAL_5_2009_01-EMP_DUAL_5_2009_48 _1562 EMP_DUAL_5_2009_50 _1564-_1565 _1566-_1580 EMP_DUAL_5_2010_16 _1582-_1589 EMP_DUAL_5_2010_25-EMP_DUAL_5_2010_51 _1617 _1618-_1623 EMP_DUAL_5_2011_07-EMP_DUAL_5_2011_13 _1631-_1637 EMP_DUAL_5_2011_21-EMP_DUAL_5_2011_53 EMP_DUAL_5_2012_01-EMP_DUAL_5_2012_52 EMP_DUAL_5_2013_01-EMP_DUAL_5_2013_52 EMP_DUAL_5_2014_01-EMP_DUAL_5_2014_52 EMP_DUAL_5_2015_01-EMP_DUAL_5_2015_45 _1872-_1874 EMP_DUAL_5_2015_49 _1876 EMP_DUAL_5_2015_51 EMP_DUAL_5_2015_52 EMP_DUAL_5_2016_01-EMP_DUAL_5_2016_53 EMP_DUAL_5_2017_01-EMP_DUAL_5_2017_52 EMP_DUAL_5_2018_01-EMP_DUAL_5_2018_52 EMP_DUAL_5_2019_01-EMP_DUAL_5_2019_51 _2087 _2088 EMP_DUAL_5_2020_02 _2090-_2231; array dual_6 (i) _1-_730 _731-_1162 EMP_DUAL_6_2002_15-EMP_DUAL_6_2002_22 _1171-_1175 EMP_DUAL_6_2002_28-EMP_DUAL_6_2002_31 _1180-_1222 EMP_DUAL_6_2003_23 _1224-_1380 EMP_DUAL_6_2006_24 _1382-_1415 EMP_DUAL_6_2007_07-EMP_DUAL_6_2007_52 EMP_DUAL_6_2008_01-EMP_DUAL_6_2008_32 _1494-_1513 _1514 EMP_DUAL_6_2009_02-EMP_DUAL_6_2009_47 _1561-_1655 EMP_DUAL_6_2011_39-EMP_DUAL_6_2011_43 _1661 EMP_DUAL_6_2011_45-EMP_DUAL_6_2011_51 _1669-_1856 EMP_DUAL_6_2015_31-EMP_DUAL_6_2015_46 _1873-_1884 EMP_DUAL_6_2016_07 _1886-_1907 EMP_DUAL_6_2016_30 _1909-_1933 EMP_DUAL_6_2017_03-EMP_DUAL_6_2017_52 EMP_DUAL_6_2018_01-EMP_DUAL_6_2018_14 _1998-_2231; array dual_7 (i) _1-_730 _731-_1440 EMP_DUAL_7_2007_32-EMP_DUAL_7_2007_52 EMP_DUAL_7_2008_01-EMP_DUAL_7_2008_31 _1493-_1513 _1514 EMP_DUAL_7_2009_02-EMP_DUAL_7_2009_47 _1561-_1565 _1566-_1941 EMP_DUAL_7_2017_11-EMP_DUAL_7_2017_19 _1951-_1954 EMP_DUAL_7_2017_24-EMP_DUAL_7_2017_31 _1963-_1978 EMP_DUAL_7_2017_48-EMP_DUAL_7_2017_52 _1984-_2231; array dual_8 (i) _1-_730 _731-_1449 EMP_DUAL_8_2007_41-EMP_DUAL_8_2007_50 _1460-_1559 EMP_DUAL_8_2009_47 _1561-_1565 _1566-_2231; array self &r0sel; array uid &r0uid; array jobwks job1wks job2wks job3wks job4wks job5wks job6wks job7wks job8wks job9wks job10wks; %macro emp36; array r0j&yr r0j&yr.01 -r0j&yr.10; array r0d&yr r0d&yr.01 -r0d&yr.10; array r0s&yr r0s&yr.01 -r0s&yr.10; array r0e&yr r0e&yr.01 -r0e&yr.10; do over r0j&yr; r0j&yr =0; r0s&yr =0; r0e&yr =0; end; do over r0j&yr; do i=&cw; if i ge rd0wk and i9700 and r0j&yr.01 ne r0d&yr.01 then r0job&yr =r0job&yr +1; if r0j&yr.01=-3 then r0job&yr =-3; if r0job&yr ge 0 and r0j&yr.02>9700 and r0j&yr.02 ne r0d&yr.02 then r0job&yr =r0job&yr +1; if r0j&yr.02=-3 then r0job&yr =-3; if r0job&yr ge 0 and r0j&yr.03>9700 and r0j&yr.03 ne r0d&yr.03 then r0job&yr =r0job&yr +1; if r0j&yr.03=-3 then r0job&yr =-3; if r0job&yr ge 0 and r0j&yr.04>9700 and r0j&yr.04 ne r0d&yr.04 then r0job&yr =r0job&yr +1; if r0j&yr.04=-3 then r0job&yr =-3; if r0job&yr ge 0 and r0j&yr.05>9700 and r0j&yr.05 ne r0d&yr.05 then r0job&yr =r0job&yr +1; if r0j&yr.05=-3 then r0job&yr =-3; if r0job&yr ge 0 and r0j&yr.06>9700 and r0j&yr.06 ne r0d&yr.06 then r0job&yr =r0job&yr +1; if r0j&yr.06=-3 then r0job&yr =-3; if r0job&yr ge 0 and r0j&yr.07>9700 and r0j&yr.07 ne r0d&yr.07 then r0job&yr =r0job&yr +1; if r0j&yr.07=-3 then r0job&yr =-3; if r0job&yr ge 0 and r0j&yr.08>9700 and r0j&yr.08 ne r0d&yr.08 then r0job&yr =r0job&yr +1; if r0j&yr.08=-3 then r0job&yr =-3; if r0job&yr ge 0 and r0j&yr.09>9700 and r0j&yr.09 ne r0d&yr.09 then r0job&yr =r0job&yr +1; if r0j&yr.09=-3 then r0job&yr =-3; if r0job&yr ge 0 and r0j&yr.10>9700 and r0j&yr.10 ne r0d&yr.10 then r0job&yr =r0job&yr +1; if r0j&yr.10=-3 then r0job&yr =-3; if r0emp&yr ge 0 and r0e&yr.01>9700 and r0e&yr.01 ne r0d&yr.01 then r0emp&yr =r0emp&yr +1; if r0e&yr.01=-3 then r0emp&yr =-3; if r0emp&yr ge 0 and r0e&yr.02>9700 and r0e&yr.02 ne r0d&yr.02 then r0emp&yr =r0emp&yr +1; if r0e&yr.02=-3 then r0emp&yr =-3; if r0emp&yr ge 0 and r0e&yr.03>9700 and r0e&yr.03 ne r0d&yr.03 then r0emp&yr =r0emp&yr +1; if r0e&yr.03=-3 then r0emp&yr =-3; if r0emp&yr ge 0 and r0e&yr.04>9700 and r0e&yr.04 ne r0d&yr.04 then r0emp&yr =r0emp&yr +1; if r0e&yr.04=-3 then r0emp&yr =-3; if r0emp&yr ge 0 and r0e&yr.05>9700 and r0e&yr.05 ne r0d&yr.05 then r0emp&yr =r0emp&yr +1; if r0e&yr.05=-3 then r0emp&yr =-3; if r0emp&yr ge 0 and r0e&yr.06>9700 and r0e&yr.06 ne r0d&yr.06 then r0emp&yr =r0emp&yr +1; if r0e&yr.06=-3 then r0emp&yr =-3; if r0emp&yr ge 0 and r0e&yr.07>9700 and r0e&yr.07 ne r0d&yr.07 then r0emp&yr =r0emp&yr +1; if r0e&yr.07=-3 then r0emp&yr =-3; if r0emp&yr ge 0 and r0e&yr.08>9700 and r0e&yr.08 ne r0d&yr.08 then r0emp&yr =r0emp&yr +1; if r0e&yr.08=-3 then r0emp&yr =-3; if r0emp&yr ge 0 and r0e&yr.09>9700 and r0e&yr.09 ne r0d&yr.09 then r0emp&yr =r0emp&yr +1; if r0e&yr.09=-3 then r0emp&yr =-3; if r0emp&yr ge 0 and r0e&yr.10>9700 and r0e&yr.10 ne r0d&yr.10 then r0emp&yr =r0emp&yr +1; if r0e&yr.10=-3 then r0emp&yr =-3; if r0self&yr ge 0 and r0s&yr.01>9700 and r0s&yr.01 ne r0d&yr.01 then r0self&yr =r0self&yr +1; if r0s&yr.01=-3 then r0self&yr =-3; if r0self&yr ge 0 and r0s&yr.02>9700 and r0s&yr.02 ne r0d&yr.02 then r0self&yr =r0self&yr +1; if r0s&yr.02=-3 then r0self&yr =-3; if r0self&yr ge 0 and r0s&yr.03>9700 and r0s&yr.03 ne r0d&yr.03 then r0self&yr =r0self&yr +1; if r0s&yr.03=-3 then r0self&yr =-3; if r0self&yr ge 0 and r0s&yr.04>9700 and r0s&yr.04 ne r0d&yr.04 then r0self&yr =r0self&yr +1; if r0s&yr.04=-3 then r0self&yr =-3; if r0self&yr ge 0 and r0s&yr.05>9700 and r0s&yr.05 ne r0d&yr.05 then r0self&yr =r0self&yr +1; if r0s&yr.05=-3 then r0self&yr =-3; if r0self&yr ge 0 and r0s&yr.06>9700 and r0s&yr.06 ne r0d&yr.06 then r0self&yr =r0self&yr +1; if r0s&yr.06=-3 then r0self&yr =-3; if r0self&yr ge 0 and r0s&yr.07>9700 and r0s&yr.07 ne r0d&yr.07 then r0self&yr =r0self&yr +1; if r0s&yr.07=-3 then r0self&yr =-3; if r0self&yr ge 0 and r0s&yr.08>9700 and r0s&yr.08 ne r0d&yr.08 then r0self&yr =r0self&yr +1; if r0s&yr.08=-3 then r0self&yr =-3; if r0self&yr ge 0 and r0s&yr.09>9700 and r0s&yr.09 ne r0d&yr.09 then r0self&yr =r0self&yr +1; if r0s&yr.09=-3 then r0self&yr =-3; if r0self&yr ge 0 and r0s&yr.10>9700 and r0s&yr.10 ne r0d&yr.10 then r0self&yr =r0self&yr +1; if r0s&yr.10=-3 then r0self&yr =-3; %mend emp36; %let yr=97; %let cw= 888 to 939; %emp36 %let yr=98; %let cw= 940 to 991; %emp36 %let yr=99; %let cw= 992 to 1043; %emp36 %let yr=00; %let cw=1044 to 1096; %emp36 %let yr=01; %let cw=1097 to 1148; %emp36 %let yr=02; %let cw=1149 to 1200; %emp36 %let yr=03; %let cw=1201 to 1252; %emp36 %let yr=04; %let cw=1253 to 1304; %emp36 %let yr=05; %let cw=1305 to 1357; %emp36 %let yr=06; %let cw=1358 to 1409; %emp36 %let yr=07; %let cw=1410 to 1461; %emp36 %let yr=08; %let cw=1462 to 1513; %emp36 %let yr=09; %let cw=1514 to 1565; %emp36 %let yr=10; %let cw=1566 to 1617; %emp36 %let yr=11; %let cw=1618 to 1670; %emp36 %let yr=12; %let cw=1671 to 1722; %emp36 %let yr=13; %let cw=1723 to 1774; %emp36 %let yr=14; %let cw=1775 to 1826; %emp36 %let yr=15; %let cw=1827 to 1878; %emp36 %let yr=16; %let cw=1879 to 1931; %emp36 %let yr=17; %let cw=1932 to 1983; %emp36 %let yr=18; %let cw=1984 to 2035; %emp36 %let yr=19; %let cw=2036 to 2087; %emp36 %let yr=20; %let cw=2088 to 2139; %emp36 %let yr=21; %let cw=2140 to 2191; %emp36 %let yr=22; %let cw=2192 to 2244; %emp36 run; data emp37_numjobs14; merge two emp_bday emp_int emp_week emp_countweeks r20.empstatus; by pubid; if r0int ne -5; ********************************************************************** ** Number of jobs held since age 14 & 20 ** ** (conditional on having worked at least 1 week since age14) ** ** Variables created: r0empage14 r0jobage14 r0empage20 r0jobage20 ** **********************************************************************; array job1wks (i) _1-_892 w1_893-w1_2231; array job2wks (i) _1-_892 w2_893-w2_2231; array job3wks (i) _1-_892 w3_893-w3_2231; array job4wks (i) _1-_892 w4_893-w4_2231; array job5wks (i) _1-_892 w5_893-w5_2231; array job6wks (i) _1-_892 w6_893-w6_2231; array job7wks (i) _1-_892 w7_893-w7_2231; array job8wks (i) _1-_892 w8_893-w8_2231; array job9wks (i) _1-_892 w9_893-w9_2231; array job10wks (i) _1-_892 w10_893-w10_2231; array empstat (i) _1-_730 EMP_STATUS_1994_01-EMP_STATUS_1994_53 EMP_STATUS_1995_01-EMP_STATUS_1995_52 EMP_STATUS_1996_01-EMP_STATUS_1996_52 EMP_STATUS_1997_01-EMP_STATUS_1997_52 EMP_STATUS_1998_01-EMP_STATUS_1998_52 EMP_STATUS_1999_01-EMP_STATUS_1999_52 EMP_STATUS_2000_01-EMP_STATUS_2000_53 EMP_STATUS_2001_01-EMP_STATUS_2001_52 EMP_STATUS_2002_01-EMP_STATUS_2002_52 EMP_STATUS_2003_01-EMP_STATUS_2003_52 EMP_STATUS_2004_01-EMP_STATUS_2004_52 EMP_STATUS_2005_01-EMP_STATUS_2005_53 EMP_STATUS_2006_01-EMP_STATUS_2006_52 EMP_STATUS_2007_01-EMP_STATUS_2007_52 EMP_STATUS_2008_01-EMP_STATUS_2008_52 EMP_STATUS_2009_01-EMP_STATUS_2009_52 EMP_STATUS_2010_01-EMP_STATUS_2010_52 EMP_STATUS_2011_01-EMP_STATUS_2011_53 EMP_STATUS_2012_01-EMP_STATUS_2012_52 EMP_STATUS_2013_01-EMP_STATUS_2013_52 EMP_STATUS_2014_01-EMP_STATUS_2014_52 EMP_STATUS_2015_01-EMP_STATUS_2015_52 EMP_STATUS_2016_01-EMP_STATUS_2016_53 EMP_STATUS_2017_01-EMP_STATUS_2017_52 EMP_STATUS_2018_01-EMP_STATUS_2018_52 EMP_STATUS_2019_01-EMP_STATUS_2019_52 EMP_STATUS_2020_01-EMP_STATUS_2020_29 _2117-_2231; array dual_2 (i) _1-_730 _731-_750 EMP_DUAL_2_1994_21-EMP_DUAL_2_1994_53 EMP_DUAL_2_1995_01-EMP_DUAL_2_1995_52 EMP_DUAL_2_1996_01-EMP_DUAL_2_1996_52 EMP_DUAL_2_1997_01-EMP_DUAL_2_1997_52 EMP_DUAL_2_1998_01-EMP_DUAL_2_1998_52 EMP_DUAL_2_1999_01-EMP_DUAL_2_1999_52 EMP_DUAL_2_2000_01-EMP_DUAL_2_2000_53 EMP_DUAL_2_2001_01-EMP_DUAL_2_2001_52 EMP_DUAL_2_2002_01-EMP_DUAL_2_2002_52 EMP_DUAL_2_2003_01-EMP_DUAL_2_2003_52 EMP_DUAL_2_2004_01-EMP_DUAL_2_2004_52 EMP_DUAL_2_2005_01-EMP_DUAL_2_2005_53 EMP_DUAL_2_2006_01-EMP_DUAL_2_2006_52 EMP_DUAL_2_2007_01-EMP_DUAL_2_2007_52 EMP_DUAL_2_2008_01-EMP_DUAL_2_2008_52 EMP_DUAL_2_2009_01-EMP_DUAL_2_2009_52 EMP_DUAL_2_2010_01-EMP_DUAL_2_2010_52 EMP_DUAL_2_2011_01-EMP_DUAL_2_2011_53 EMP_DUAL_2_2012_01-EMP_DUAL_2_2012_52 EMP_DUAL_2_2013_01-EMP_DUAL_2_2013_52 EMP_DUAL_2_2014_01-EMP_DUAL_2_2014_52 EMP_DUAL_2_2015_01-EMP_DUAL_2_2015_52 EMP_DUAL_2_2016_01-EMP_DUAL_2_2016_53 EMP_DUAL_2_2017_01-EMP_DUAL_2_2017_52 EMP_DUAL_2_2018_01-EMP_DUAL_2_2018_52 EMP_DUAL_2_2019_01-EMP_DUAL_2_2019_52 EMP_DUAL_2_2020_01-EMP_DUAL_2_2020_27 _2115-_2231; array dual_3 (i) _1-_730 _731-_795 EMP_DUAL_3_1995_13-EMP_DUAL_3_1995_52 EMP_DUAL_3_1996_01-EMP_DUAL_3_1996_52 EMP_DUAL_3_1997_01-EMP_DUAL_3_1997_52 EMP_DUAL_3_1998_01-EMP_DUAL_3_1998_52 EMP_DUAL_3_1999_01-EMP_DUAL_3_1999_52 EMP_DUAL_3_2000_01-EMP_DUAL_3_2000_53 EMP_DUAL_3_2001_01-EMP_DUAL_3_2001_52 EMP_DUAL_3_2002_01-EMP_DUAL_3_2002_52 EMP_DUAL_3_2003_01-EMP_DUAL_3_2003_52 EMP_DUAL_3_2004_01-EMP_DUAL_3_2004_52 EMP_DUAL_3_2005_01-EMP_DUAL_3_2005_53 EMP_DUAL_3_2006_01-EMP_DUAL_3_2006_52 EMP_DUAL_3_2007_01-EMP_DUAL_3_2007_52 EMP_DUAL_3_2008_01-EMP_DUAL_3_2008_52 EMP_DUAL_3_2009_01-EMP_DUAL_3_2009_52 EMP_DUAL_3_2010_01-EMP_DUAL_3_2010_52 EMP_DUAL_3_2011_01-EMP_DUAL_3_2011_53 EMP_DUAL_3_2012_01-EMP_DUAL_3_2012_52 EMP_DUAL_3_2013_01-EMP_DUAL_3_2013_52 EMP_DUAL_3_2014_01-EMP_DUAL_3_2014_52 EMP_DUAL_3_2015_01-EMP_DUAL_3_2015_52 EMP_DUAL_3_2016_01-EMP_DUAL_3_2016_53 EMP_DUAL_3_2017_01-EMP_DUAL_3_2017_52 EMP_DUAL_3_2018_01-EMP_DUAL_3_2018_52 EMP_DUAL_3_2019_01-EMP_DUAL_3_2019_52 EMP_DUAL_3_2020_01-EMP_DUAL_3_2020_10 _2098-_2109 EMP_DUAL_3_2020_23 _2111-_2113 EMP_DUAL_3_2020_27 _2115-_2231; array dual_4 (i) _1-_730 _731-_843 EMP_DUAL_4_1996_09-EMP_DUAL_4_1996_36 _872-_887 _888-_894 EMP_DUAL_4_1997_08 _896 _897 EMP_DUAL_4_1997_11-EMP_DUAL_4_1997_35 _923-_939 _940 EMP_DUAL_4_1998_02-EMP_DUAL_4_1998_20 _960 _961 EMP_DUAL_4_1998_23 _963-_973 EMP_DUAL_4_1998_35 _975-_1013 EMP_DUAL_4_1999_23-EMP_DUAL_4_1999_31 _1023-_1030 EMP_DUAL_4_1999_40 _1032-_1037 EMP_DUAL_4_1999_47-EMP_DUAL_4_1999_49 _1041-_1043 EMP_DUAL_4_2000_01-EMP_DUAL_4_2000_07 _1051-_1056 EMP_DUAL_4_2000_14 _1058-_1061 EMP_DUAL_4_2000_19-EMP_DUAL_4_2000_53 EMP_DUAL_4_2001_01-EMP_DUAL_4_2001_52 EMP_DUAL_4_2002_01-EMP_DUAL_4_2002_52 EMP_DUAL_4_2003_01-EMP_DUAL_4_2003_52 EMP_DUAL_4_2004_01-EMP_DUAL_4_2004_52 EMP_DUAL_4_2005_01-EMP_DUAL_4_2005_53 EMP_DUAL_4_2006_01-EMP_DUAL_4_2006_52 EMP_DUAL_4_2007_01-EMP_DUAL_4_2007_52 EMP_DUAL_4_2008_01-EMP_DUAL_4_2008_52 EMP_DUAL_4_2009_01-EMP_DUAL_4_2009_52 EMP_DUAL_4_2010_01-EMP_DUAL_4_2010_52 EMP_DUAL_4_2011_01-EMP_DUAL_4_2011_53 EMP_DUAL_4_2012_01-EMP_DUAL_4_2012_52 EMP_DUAL_4_2013_01-EMP_DUAL_4_2013_52 EMP_DUAL_4_2014_01-EMP_DUAL_4_2014_52 EMP_DUAL_4_2015_01-EMP_DUAL_4_2015_49 _1876 EMP_DUAL_4_2015_51 EMP_DUAL_4_2015_52 EMP_DUAL_4_2016_01-EMP_DUAL_4_2016_53 EMP_DUAL_4_2017_01-EMP_DUAL_4_2017_52 EMP_DUAL_4_2018_01-EMP_DUAL_4_2018_52 EMP_DUAL_4_2019_01-EMP_DUAL_4_2019_52 EMP_DUAL_4_2020_01-EMP_DUAL_4_2020_02 _2090-_2231; array dual_5 (i) _1-_730 _731-_1030 EMP_DUAL_5_1999_40 _1032-_1101 EMP_DUAL_5_2001_06-EMP_DUAL_5_2001_52 EMP_DUAL_5_2002_01-EMP_DUAL_5_2002_52 EMP_DUAL_5_2003_01-EMP_DUAL_5_2003_23 _1224-_1226 EMP_DUAL_5_2003_27-EMP_DUAL_5_2003_39 _1240-_1244 EMP_DUAL_5_2003_45-EMP_DUAL_5_2003_52 EMP_DUAL_5_2004_01-EMP_DUAL_5_2004_06 _1259-_1270 EMP_DUAL_5_2004_19-EMP_DUAL_5_2004_30 _1283-_1335 EMP_DUAL_5_2005_32-EMP_DUAL_5_2005_41 _1346-_1352 EMP_DUAL_5_2005_49 _1354-_1368 EMP_DUAL_5_2006_12 EMP_DUAL_5_2006_13 _1371-_1379 EMP_DUAL_5_2006_23-EMP_DUAL_5_2006_52 EMP_DUAL_5_2007_01-EMP_DUAL_5_2007_52 EMP_DUAL_5_2008_01-EMP_DUAL_5_2008_33 _1495 _1496 EMP_DUAL_5_2008_36-EMP_DUAL_5_2008_52 EMP_DUAL_5_2009_01-EMP_DUAL_5_2009_48 _1562 EMP_DUAL_5_2009_50 _1564-_1565 _1566-_1580 EMP_DUAL_5_2010_16 _1582-_1589 EMP_DUAL_5_2010_25-EMP_DUAL_5_2010_51 _1617 _1618-_1623 EMP_DUAL_5_2011_07-EMP_DUAL_5_2011_13 _1631-_1637 EMP_DUAL_5_2011_21-EMP_DUAL_5_2011_53 EMP_DUAL_5_2012_01-EMP_DUAL_5_2012_52 EMP_DUAL_5_2013_01-EMP_DUAL_5_2013_52 EMP_DUAL_5_2014_01-EMP_DUAL_5_2014_52 EMP_DUAL_5_2015_01-EMP_DUAL_5_2015_45 _1872-_1874 EMP_DUAL_5_2015_49 _1876 EMP_DUAL_5_2015_51 EMP_DUAL_5_2015_52 EMP_DUAL_5_2016_01-EMP_DUAL_5_2016_53 EMP_DUAL_5_2017_01-EMP_DUAL_5_2017_52 EMP_DUAL_5_2018_01-EMP_DUAL_5_2018_52 EMP_DUAL_5_2019_01-EMP_DUAL_5_2019_51 _2087 _2088 EMP_DUAL_5_2020_02 _2090-_2231; array dual_6 (i) _1-_730 _731-_1162 EMP_DUAL_6_2002_15-EMP_DUAL_6_2002_22 _1171-_1175 EMP_DUAL_6_2002_28-EMP_DUAL_6_2002_31 _1180-_1222 EMP_DUAL_6_2003_23 _1224-_1380 EMP_DUAL_6_2006_24 _1382-_1415 EMP_DUAL_6_2007_07-EMP_DUAL_6_2007_52 EMP_DUAL_6_2008_01-EMP_DUAL_6_2008_32 _1494-_1513 _1514 EMP_DUAL_6_2009_02-EMP_DUAL_6_2009_47 _1561-_1655 EMP_DUAL_6_2011_39-EMP_DUAL_6_2011_43 _1661 EMP_DUAL_6_2011_45-EMP_DUAL_6_2011_51 _1669-_1856 EMP_DUAL_6_2015_31-EMP_DUAL_6_2015_46 _1873-_1884 EMP_DUAL_6_2016_07 _1886-_1907 EMP_DUAL_6_2016_30 _1909-_1933 EMP_DUAL_6_2017_03-EMP_DUAL_6_2017_52 EMP_DUAL_6_2018_01-EMP_DUAL_6_2018_14 _1998-_2231; array dual_7 (i) _1-_730 _731-_1440 EMP_DUAL_7_2007_32-EMP_DUAL_7_2007_52 EMP_DUAL_7_2008_01-EMP_DUAL_7_2008_31 _1493-_1513 _1514 EMP_DUAL_7_2009_02-EMP_DUAL_7_2009_47 _1561-_1565 _1566-_1941 EMP_DUAL_7_2017_11-EMP_DUAL_7_2017_19 _1951-_1954 EMP_DUAL_7_2017_24-EMP_DUAL_7_2017_31 _1963-_1978 EMP_DUAL_7_2017_48-EMP_DUAL_7_2017_52 _1984-_2231; array dual_8 (i) _1-_730 _731-_1449 EMP_DUAL_8_2007_41-EMP_DUAL_8_2007_50 _1460-_1559 EMP_DUAL_8_2009_47 _1561-_1565 _1566-_2231; *************************************************************************** ** Indicate if worked at least one week on a NEW job since age 14 & 20 ** ***************************************************************************; array r0e14 r0e1401-r0e1410; array r0j14 r0j1401-r0j1410; array r0d14 r0d1401-r0d1410; array r0e20 r0e2001-r0e2010; array r0j20 r0j2001-r0j2010; array r0d20 r0d2001-r0d2010; array self &R0sel; array uid &r0uid; array jobwks job1wks job2wks job3wks job4wks job5wks job6wks job7wks job8wks job9wks job10wks; end14wk=min(age20wk-1, r0int-1); if end14wk ge rd0wk then do; r0jobage14=0; r0empage14=0; do i=rd0wk to end14wk; do over r0j14; if jobwks=-3 then r0j14=-3; if jobwks=-3 and self=0 then r0e14=-3; end; do over r0j14; if jobwks=1 then r0j14=uid; if jobwks=1 and self=0 then r0e14=uid; end; end; do i=age14wk to rd0wk-1; do over r0d14; if empstat=r0j14 then r0d14 =r0j14; if dual_2 =r0j14 then r0d14 =r0j14; if dual_3 =r0j14 then r0d14 =r0j14; if dual_4 =r0j14 then r0d14 =r0j14; if dual_5 =r0j14 then r0d14 =r0j14; if dual_6 =r0j14 then r0d14 =r0j14; if dual_7 =r0j14 then r0d14 =r0j14; if dual_8 =r0j14 then r0d14 =r0j14; end; end; end; rd20wk=max(rd0wk,age20wk); if age20wk le r0int-1 then do; r0jobage20=0; r0empage20=0; do i=rd20wk to (r0int-1); do over r0j20; if jobwks=-3 then r0j20=-3; if jobwks=-3 and self=0 then r0e20=-3; end; end; do i=rd20wk to (r0int-1); do over r0j20; if jobwks=1 then r0j20=uid; if jobwks=1 and self=0 then r0e20=uid; end; end; do i=age20wk to (rd20wk-1); do over r0d20; if empstat=r0j20 then r0d20 =r0j20; if dual_2 =r0j20 then r0d20 =r0j20; if dual_3 =r0j20 then r0d20 =r0j20; if dual_4 =r0j20 then r0d20 =r0j20; if dual_5 =r0j20 then r0d20 =r0j20; if dual_6 =r0j20 then r0d20 =r0j20; if dual_7 =r0j20 then r0d20 =r0j20; if dual_8 =r0j20 then r0d20 =r0j20; end; end; end; if r0empage14 ge 0 and r0e1401>9700 and r0e1401 ne r0d1401 then r0empage14 =r0empage14 +1; if r0e1401=-3 then r0empage14 =-3; if r0empage14 ge 0 and r0e1402>9700 and r0e1402 ne r0d1402 then r0empage14 =r0empage14 +1; if r0e1402=-3 then r0empage14 =-3; if r0empage14 ge 0 and r0e1403>9700 and r0e1403 ne r0d1403 then r0empage14 =r0empage14 +1; if r0e1403=-3 then r0empage14 =-3; if r0empage14 ge 0 and r0e1404>9700 and r0e1404 ne r0d1404 then r0empage14 =r0empage14 +1; if r0e1404=-3 then r0empage14 =-3; if r0empage14 ge 0 and r0e1405>9700 and r0e1405 ne r0d1405 then r0empage14 =r0empage14 +1; if r0e1405=-3 then r0empage14 =-3; if r0empage14 ge 0 and r0e1406>9700 and r0e1406 ne r0d1406 then r0empage14 =r0empage14 +1; if r0e1406=-3 then r0empage14 =-3; if r0empage14 ge 0 and r0e1407>9700 and r0e1407 ne r0d1407 then r0empage14 =r0empage14 +1; if r0e1407=-3 then r0empage14 =-3; if r0empage14 ge 0 and r0e1408>9700 and r0e1408 ne r0d1408 then r0empage14 =r0empage14 +1; if r0e1408=-3 then r0empage14 =-3; if r0empage14 ge 0 and r0e1409>9700 and r0e1409 ne r0d1409 then r0empage14 =r0empage14 +1; if r0e1409=-3 then r0empage14 =-3; if r0empage14 ge 0 and r0e1410>9700 and r0e1410 ne r0d1410 then r0empage14 =r0empage14 +1; if r0e1410=-3 then r0empage14 =-3; if r0jobage20 ge 0 and r0j2001>9700 and r0j2001 ne r0d2001 then r0jobage20 =r0jobage20 +1; if r0j2001=-3 then r0jobage20 =-3; if r0jobage20 ge 0 and r0j2002>9700 and r0j2002 ne r0d2002 then r0jobage20 =r0jobage20 +1; if r0j2002=-3 then r0jobage20 =-3; if r0jobage20 ge 0 and r0j2003>9700 and r0j2003 ne r0d2003 then r0jobage20 =r0jobage20 +1; if r0j2003=-3 then r0jobage20 =-3; if r0jobage20 ge 0 and r0j2004>9700 and r0j2004 ne r0d2004 then r0jobage20 =r0jobage20 +1; if r0j2004=-3 then r0jobage20 =-3; if r0jobage20 ge 0 and r0j2005>9700 and r0j2005 ne r0d2005 then r0jobage20 =r0jobage20 +1; if r0j2005=-3 then r0jobage20 =-3; if r0jobage20 ge 0 and r0j2006>9700 and r0j2006 ne r0d2006 then r0jobage20 =r0jobage20 +1; if r0j2006=-3 then r0jobage20 =-3; if r0jobage20 ge 0 and r0j2007>9700 and r0j2007 ne r0d2007 then r0jobage20 =r0jobage20 +1; if r0j2007=-3 then r0jobage20 =-3; if r0jobage20 ge 0 and r0j2008>9700 and r0j2008 ne r0d2008 then r0jobage20 =r0jobage20 +1; if r0j2008=-3 then r0jobage20 =-3; if r0jobage20 ge 0 and r0j2009>9700 and r0j2009 ne r0d2009 then r0jobage20 =r0jobage20 +1; if r0j2009=-3 then r0jobage20 =-3; if r0jobage20 ge 0 and r0j2010>9700 and r0j2010 ne r0d2010 then r0jobage20 =r0jobage20 +1; if r0j2010=-3 then r0jobage20 =-3; if r0empage20 ge 0 and r0e2001>9700 and r0e2001 ne r0d2001 then r0empage20 =r0empage20 +1; if r0e2001=-3 then r0empage20 =-3; if r0empage20 ge 0 and r0e2002>9700 and r0e2002 ne r0d2002 then r0empage20 =r0empage20 +1; if r0e2002=-3 then r0empage20 =-3; if r0empage20 ge 0 and r0e2003>9700 and r0e2003 ne r0d2003 then r0empage20 =r0empage20 +1; if r0e2003=-3 then r0empage20 =-3; if r0empage20 ge 0 and r0e2004>9700 and r0e2004 ne r0d2004 then r0empage20 =r0empage20 +1; if r0e2004=-3 then r0empage20 =-3; if r0empage20 ge 0 and r0e2005>9700 and r0e2005 ne r0d2005 then r0empage20 =r0empage20 +1; if r0e2005=-3 then r0empage20 =-3; if r0empage20 ge 0 and r0e2006>9700 and r0e2006 ne r0d2006 then r0empage20 =r0empage20 +1; if r0e2006=-3 then r0empage20 =-3; if r0empage20 ge 0 and r0e2007>9700 and r0e2007 ne r0d2007 then r0empage20 =r0empage20 +1; if r0e2007=-3 then r0empage20 =-3; if r0empage20 ge 0 and r0e2008>9700 and r0e2008 ne r0d2008 then r0empage20 =r0empage20 +1; if r0e2008=-3 then r0empage20 =-3; if r0empage20 ge 0 and r0e2009>9700 and r0e2009 ne r0d2009 then r0empage20 =r0empage20 +1; if r0e2009=-3 then r0empage20 =-3; if r0empage20 ge 0 and r0e2010>9700 and r0e2010 ne r0d2010 then r0empage20 =r0empage20 +1; if r0e2010=-3 then r0empage20 =-3; run; data emp_array; merge two emp_bday (keep=pubid age14wk) emp_int(keep=pubid r0int) emp33_anhours (keep=pubid hours01-hours10) emp_week emp_gaps emp_countweeks(keep=pubid rd0wk starf_1-starf_10 stopf_1-stopf_10 begwk01-begwk10 endwk01-endwk10); by pubid; if r0int>-5; array job1wks (i) _1-_892 wk1_893-wk1_2231; array hourwk1 (i) _1-_892 hr1_893-hr1_2231; array job2wks (i) _1-_892 wk2_893-wk2_2231; array hourwk2 (i) _1-_892 hr2_893-hr2_2231; array job3wks (i) _1-_892 wk3_893-wk3_2231; array hourwk3 (i) _1-_892 hr3_893-hr3_2231; array job4wks (i) _1-_892 wk4_893-wk4_2231; array hourwk4 (i) _1-_892 hr4_893-hr4_2231; array job5wks (i) _1-_892 wk5_893-wk5_2231; array hourwk5 (i) _1-_892 hr5_893-hr5_2231; array job6wks (i) _1-_892 wk6_893-wk6_2231; array hourwk6 (i) _1-_892 hr6_893-hr6_2231; array job7wks (i) _1-_892 wk7_893-wk7_2231; array hourwk7 (i) _1-_892 hr7_893-hr7_2231; array job8wks (i) _1-_892 wk8_893-wk8_2231; array hourwk8 (i) _1-_892 hr8_893-hr8_2231; array job9wks (i) _1-_892 wk9_893-wk9_2231; array hourwk9 (i) _1-_892 hr9_893-hr9_2231; array job10wks (i) _1-_892 wk10_893-wk10_2231; array hourwk10 (i) _1-_892 hr10_893-hr10_2231; * Default Settings; do i=893 to 2231; job1wks=0; job2wks=0; job3wks=0; job4wks=0; job5wks=0; job6wks=0; job7wks=0; job8wks=0; job9wks=0; job10wks=0; hourwk1=0; hourwk2=0; hourwk3=0; hourwk4=0; hourwk5=0; hourwk6=0; hourwk7=0; hourwk8=0; hourwk9=0; hourwk10=0; end; *********************************** **start and stop dates: all jobs ** ***********************************; array starw starw01-starw10; array stopw stopw01-stopw10; array starf starf_1-starf_10; array stopf stopf_1-stopf_10; array uid &R0uid; array staryrf staryrf01-staryrf10; array stopyrf stopyrf01-stopyrf10; array smof smof01-smof10; array emof emof01-emof10; array stary stary01-stary10; array stopy stopy01-stopy10; array begwk begwk01-begwk10; array endwk endwk01-endwk10; array r0mil &R0mil; array hours hours01-hours10; array jobwks job1wks job2wks job3wks job4wks job5wks job6wks job7wks job8wks job9wks job10wks; array hourwk hourwk1 hourwk2 hourwk3 hourwk4 hourwk5 hourwk6 hourwk7 hourwk8 hourwk9 hourwk10; do over starw; if starw=-3 and uid ne -5 then do; starw=rd0wk; staryrf=1; end; *"begwk" is . for this group; if stopw=-3 and uid ne -5 then do; stopw=r0int-1; stopyrf=1; end; *"endwk01" is . for this group; *********************************** *** TOTAL WEEKS WORKED *** ***********************************; if starw>0 and stopw>0 then do; do i=(starw) to (stopw); jobwks=uid; hourwk=hours; if r0mil=1 then do; jobwks=6; hourwk=0; end; end; do i=893 to 2231; if jobwks>9700 and hourwk=0 then hourwk=-3; end; end; end; ******************************************************************* *** translate the continuous week# into year/week combination for start/stop dates of jobs and job gaps *** *******************************************************************; array accwk starw01-starw10 stopw01-stopw10 bgap01_01-bgap01_21 egap01_01-egap01_21 bgap02_01-bgap02_06 egap02_01-egap02_06 bgap03_01-bgap03_06 egap03_01-egap03_06 bgap04_01 egap04_01 bgap05_01 egap05_01 bgap06_01 egap06_01 bgap07_01 egap07_01; array wkinyr stawk01-stawk10 stowk01-stowk10 b1gawk1-b1gawk21 e1gawk1-e1gawk21 b2gawk1-b2gawk6 e2gawk1-e2gawk6 b3gawk1-b3gawk6 e3gawk1-e3gawk6 b4gawk1 e4gawk1 b5gawk1 e5gawk1 b6gawk1 e6gawk1 b7gawk1 e7gawk1; array yr stayr01-stayr10 stoyr01-stoyr10 b1gayr1-b1gayr21 e1gayr1-e1gayr21 b2gayr1-b2gayr6 e2gayr1-e2gayr6 b3gayr1-b3gayr6 e3gayr1-e3gayr6 b4gayr1 e4gayr1 b5gayr1 e5gayr1 b6gayr1 e6gayr1 b7gayr1 e7gayr1; do over accwk; wkinyr=-4; yr=-4; if 418 le accwk le 470 then do; yr=1988; wkinyr=accwk-417; end; if 471 le accwk le 522 then do; yr=1989; wkinyr=accwk-470; end; if 523 le accwk le 574 then do; yr=1990; wkinyr=accwk-522; end; if 575 le accwk le 626 then do; yr=1991; wkinyr=accwk-574; end; if 627 le accwk le 678 then do; yr=1992; wkinyr=accwk-626; end; if 679 le accwk le 730 then do; yr=1993; wkinyr=accwk-678; end; if 731 le accwk le 783 then do; yr=1994; wkinyr=accwk-730; end; if 784 le accwk le 835 then do; yr=1995; wkinyr=accwk-783; end; if 836 le accwk le 887 then do; yr=1996; wkinyr=accwk-835; end; if 888 le accwk le 939 then do; yr=1997; wkinyr=accwk-887; end; if 940 le accwk le 991 then do; yr=1998; wkinyr=accwk-939; end; if 992 le accwk le 1043 then do; yr=1999; wkinyr=accwk-991; end; if 1044 le accwk le 1096 then do; yr=2000; wkinyr=accwk-1043; end; if 1097 le accwk le 1148 then do; yr=2001; wkinyr=accwk-1096; end; if 1149 le accwk le 1200 then do; yr=2002; wkinyr=accwk-1148; end; if 1201 le accwk le 1252 then do; yr=2003; wkinyr=accwk-1200; end; if 1253 le accwk le 1304 then do; yr=2004; wkinyr=accwk-1252; end; if 1305 le accwk le 1357 then do; yr=2005; wkinyr=accwk-1304; end; if 1358 le accwk le 1409 then do; yr=2006; wkinyr=accwk-1357; end; if 1410 le accwk le 1461 then do; yr=2007; wkinyr=accwk-1409; end; if 1462 le accwk le 1513 then do; yr=2008; wkinyr=accwk-1461; end; if 1514 le accwk le 1565 then do; yr=2009; wkinyr=accwk-1513; end; if 1566 le accwk le 1617 then do; yr=2010; wkinyr=accwk-1565; end; if 1618 le accwk le 1670 then do; yr=2011; wkinyr=accwk-1617; end; if 1671 le accwk le 1722 then do; yr=2012; wkinyr=accwk-1670; end; if 1723 le accwk le 1774 then do; yr=2013; wkinyr=accwk-1722; end; if 1775 le accwk le 1826 then do; yr=2014; wkinyr=accwk-1774; end; if 1827 le accwk le 1878 then do; yr=2015; wkinyr=accwk-1826; end; if 1879 le accwk le 1931 then do; yr=2016; wkinyr=accwk-1878; end; if 1932 le accwk le 1983 then do; yr=2017; wkinyr=accwk-1931; end; if 1984 le accwk le 2035 then do; yr=2018; wkinyr=accwk-1983; end; if 2036 le accwk le 2087 then do; yr=2019; wkinyr=accwk-2035; end; if 2088 le accwk le 2139 then do; yr=2020; wkinyr=accwk-2087; end; if 2140 le accwk le 2191 then do; yr=2021; wkinyr=accwk-2139; end; if 2192 le accwk le 2244 then do; yr=2022; wkinyr=accwk-2191; end; end; *** invalid answers for all job start/stop dates; array stawk stawk01-stawk10; array stowk stowk01-stowk10; array stayr stayr01-stayr10; array stoyr stoyr01-stoyr10; do over stawk; if smof=1 then stawk=-3; if emof=1 then stowk=-3; if staryrf=1 then do; stayr=-3; stawk=-3; end; if stopyrf=1 then do; stoyr=-3; stowk=-3; end; end; *** Remove gaps; array bgap1 &bgap_01; array bgap2 &bgap_02; array bgap3 &bgap_03; array bgap4 &bgap_04; array bgap5 &bgap_05; array bgap6 &bgap_06; array bgap7 &bgap_07; array bgap8 &bgap_08; array bgap9 &bgap_09; array bgap10 &bgap_10; array bgap11 &bgap_11; array bgap12 &bgap_12; array bgap13 &bgap_13; array bgap14 &bgap_14; array bgap15 &bgap_15; array bgap16 &bgap_16; array bgap17 &bgap_17; array bgap18 &bgap_18; array bgap19 &bgap_19; array bgap20 &bgap_20; array bgap21 &bgap_21; array egap1 &egap_01; array egap2 &egap_02; array egap3 &egap_03; array egap4 &egap_04; array egap5 &egap_05; array egap6 &egap_06; array egap7 &egap_07; array egap8 &egap_08; array egap9 &egap_09; array egap10 &egap_10; array egap11 &egap_11; array egap12 &egap_12; array egap13 &egap_13; array egap14 &egap_14; array egap15 &egap_15; array egap16 &egap_16; array egap17 &egap_17; array egap18 &egap_18; array egap19 &egap_19; array egap20 &egap_20; array egap21 &egap_21; array bgfl1 &bgfl_01; array egfl1 &egfl_01; array bgfl2 &bgfl_02; array egfl2 &egfl_02; array bgfl3 &bgfl_03; array egfl3 &egfl_03; array bgfl4 &bgfl_04; array egfl4 &egfl_04; array bgfl5 &bgfl_05; array egfl5 &egfl_05; array bgfl6 &bgfl_06; array egfl6 &egfl_06; array bgfl7 &bgfl_07; array egfl7 &egfl_07; array bgfl8 &bgfl_08; array egfl8 &egfl_08; array bgfl9 &bgfl_09; array egfl9 &egfl_09; array bgfl10 &bgfl_10; array egfl10 &egfl_10; array bgfl11 &bgfl_11; array egfl11 &egfl_11; array bgfl12 &bgfl_12; array egfl12 &egfl_12; array bgfl13 &bgfl_13; array egfl13 &egfl_13; array bgfl14 &bgfl_14; array egfl14 &egfl_14; array bgfl15 &bgfl_15; array egfl15 &egfl_15; array bgfl16 &bgfl_16; array egfl16 &egfl_16; array bgfl17 &bgfl_17; array egfl17 &egfl_17; array bgfl18 &bgfl_18; array egfl18 &egfl_18; array bgfl19 &bgfl_19; array egfl19 &egfl_19; array bgfl20 &bgfl_20; array egfl20 &egfl_20; array bgfl21 &bgfl_21; array egfl21 &egfl_21; array E10371 &E10370001;*# of wks looking for work in with-in job gap, gap 1; array E10372 &E10370002; array E10373 &E10370003; array E10374 &E10370004; array E10375 &E10370005; array E10376 &E10370006; array E10377 &E10370007; array E10378 &E10370008; array E10379 &E10370009; array E10541 &E10540001;*# of wks looking for work/on lay-off in with-in job gap, gap 1; array E10542 &E10540002; array E10543 &E10540003; array blook1 blook1_1 blook2_1 blook3_1 blook4_1 blook5_1 blook6_1 blook7_1 E08-E10; array blook2 blook1_2 blook2_2 blook3_2 E04 E05 E06 E07 E08-E10; array blook3 blook1_3 blook2_3 blook3_3 E04 E05 E06 E07 E08-E10; array blook4 blook1_4 blook2_4 blook3_4 E04 E05 E06 E07 E08-E10; array blook5 blook1_5 blook2_5 blook3_5 E04 E05 E06 E07 E08-E10; array blook6 blook1_6 blook2_6 blook3_6 E04 E05 E06 E07 E08-E10; array blook7 blook1_7 E02 E03 E04 E05 E06 E07 E08-E10; array blook8 blook1_8 E02 E03 E04 E05 E06 E07 E08-E10; array blook9 blook1_9 E02 E03 E04 E05 E06 E07 E08-E10; array blook10 blook1_10 E02 E03 E04 E05 E06 E07 E08-E10; array blook11 blook1_11 E02 E03 E04 E05 E06 E07 E08-E10; array blook12 blook1_12 E02 E03 E04 E05 E06 E07 E08-E10; array blook13 blook1_13 E02 E03 E04 E05 E06 E07 E08-E10; array blook14 blook1_14 E02 E03 E04 E05 E06 E07 E08-E10; array blook15 blook1_15 E02 E03 E04 E05 E06 E07 E08-E10; array blook16 blook1_16 E02 E03 E04 E05 E06 E07 E08-E10; array blook17 blook1_17 E02 E03 E04 E05 E06 E07 E08-E10; array blook18 blook1_18 E02 E03 E04 E05 E06 E07 E08-E10; array blook19 blook1_19 E02 E03 E04 E05 E06 E07 E08-E10; array blook20 blook1_20 E02 E03 E04 E05 E06 E07 E08-E10; array blook21 blook1_21 E02 E03 E04 E05 E06 E07 E08-E10; array elook1 elook1_1 elook2_1 elook3_1 elook4_1 elook5_1 elook6_1 elook7_1 E08-E10; array elook2 elook1_2 elook2_2 elook3_2 E04 E05 E06 E07 E08-E10; array elook3 elook1_3 elook2_3 elook3_3 E04 E05 E06 E07 E08-E10; array elook4 elook1_4 elook2_4 elook3_4 E04 E05 E06 E07 E08-E10; array elook5 elook1_5 elook2_5 elook3_5 E04 E05 E06 E07 E08-E10; array elook6 elook1_6 elook2_6 elook3_6 E04 E05 E06 E07 E08-E10; array elook7 elook1_7 E02 E03 E04 E05 E06 E07 E08-E10; array elook8 elook1_8 E02 E03 E04 E05 E06 E07 E08-E10; array elook9 elook1_9 E02 E03 E04 E05 E06 E07 E08-E10; array elook10 elook1_10 E02 E03 E04 E05 E06 E07 E08-E10; array elook11 elook1_11 E02 E03 E04 E05 E06 E07 E08-E10; array elook12 elook1_12 E02 E03 E04 E05 E06 E07 E08-E10; array elook13 elook1_13 E02 E03 E04 E05 E06 E07 E08-E10; array elook14 elook1_14 E02 E03 E04 E05 E06 E07 E08-E10; array elook15 elook1_15 E02 E03 E04 E05 E06 E07 E08-E10; array elook16 elook1_16 E02 E03 E04 E05 E06 E07 E08-E10; array elook17 elook1_17 E02 E03 E04 E05 E06 E07 E08-E10; array elook18 elook1_18 E02 E03 E04 E05 E06 E07 E08-E10; array elook19 elook1_19 E02 E03 E04 E05 E06 E07 E08-E10; array elook20 elook1_20 E02 E03 E04 E05 E06 E07 E08-E10; array elook21 elook1_21 E02 E03 E04 E05 E06 E07 E08-E10; array E1059381 &E10593801;*# of wks looking for work in with-in job gap, gap 1- self-employed; array E1059382 &E10593802; array E1059383 &E10593803; array E1059384 &E10593804; array E1059385 &E10593805; array E1059386 &E10593806; array E1059387 &E10593807; array E1059388 &E10593808; array E1059389 &E10593809; array E10593810 &E10593810; array E10593811 &E10593811; array E10593812 &E10593812; array E10593813 &E10593813; array E10593814 &E10593814; array E10593815 &E10593815; array E10593816 &E10593816; array E10593817 &E10593817; array E10593818 &E10593818; array E10593819 &E10593819; array E10593820 &E10593820; array E10593821 &E10593821; array E105951 &E10595001; array E105952 &E10595002; array E105953 &E10595003; *array E105954 &E10595004; array E105956 &E10595006; array E1059519 &E10595019; %macro codegaps; do over bgap&g.; **create begin and end weeks looking; if E1054&g > 0 then do; blook&g.=floor(bgap&g.+((((egap&g.-bgap&g.)+1)-E1054&g.)/2)); elook&g.=floor(egap&g.-((((egap&g.-bgap&g.)+1)-E1054&g.)/2)); end; if E10595&g > 0 then do; blook&g.=floor(bgap&g.+((((egap&g.-bgap&g.)+1)-E10595&g.)/2)); elook&g.=floor(egap&g.-((((egap&g.-bgap&g.)+1)-E10595&g.)/2)); end; **code weeks for gaps; if egap&g.>=bgap&g.>0 then do; do i=(bgap&g.) to (egap&g.); jobwks=0; hourwk=0; if e1037&g.=3 then jobwks=4; if e1037&g in (1,2,-1,-2,-3) then jobwks=5; if e105938&g.=3 then jobwks=4; if e105938&g in (1,2,-1,-2,-3) then jobwks=5; end; end; if elook&g.>=blook&g.>0 then do; do i=(blook&g.) to (elook&g.); jobwks=4; end; end; ** beginning gap date bad; if bgfl&g.=1 and egap&g.>0 and starw>0 then do; do i=(starw) to (egap&g.); jobwks=3; hourwk=-6; end; end; ** ending gap date bad; if bgap&g.>0 & egfl&g.=1 and stopw>0 then do; do i=(bgap&g.) to (stopw); jobwks=3; hourwk=-6; end; end; ** both gap dates bad; if bgfl&g.=1 & egfl&g.=1 and starw>0 and stopw>0 then do; do i=(starw) to (stopw); jobwks=3; hourwk=-6; end; end; end; %mend codegaps; %let g=1; %codegaps %let g=2; %codegaps %let g=3; %codegaps %let g=4; %codegaps %let g=5; %codegaps %let g=6; %codegaps %let g=7; %codegaps %let g=8; %codegaps %let g=9; %codegaps %let g=10; %codegaps %let g=11; %codegaps %let g=12; %codegaps %let g=13; %codegaps %let g=14; %codegaps %let g=15; %codegaps %let g=16; %codegaps %let g=17; %codegaps %let g=18; %codegaps %let g=19; %codegaps %let g=20; %codegaps %let g=21; %codegaps ***bad start/stop; do over starf; if starf=1 then do; if stopw>0 | begwk>0 | bgap1>1 then do; do i=(starw) to min(stopw,begwk,(bgap1-1)); jobwks=-3; hourwk=-3; end; end; end; if stopf=1 then do; do i=max(starw,endwk,(bgap1-1)) to (stopw); jobwks=-3; hourwk=-3; end; end; end; array alljobs (i) _1-_892 wks893-wks2231; array dual2 (i) _1-_892 dl2_893-dl2_2231; array dual3 (i) _1-_892 dl3_893-dl3_2231; array dual4 (i) _1-_892 dl4_893-dl4_2231; array dual5 (i) _1-_892 dl5_893-dl5_2231; array dual6 (i) _1-_892 dl6_893-dl6_2231; array dual7 (i) _1-_892 dl7_893-dl7_2231; array dual8 (i) _1-_892 dl8_893-dl8_2231; do i=rd0wk to (r0int-1); alljobs=job1wks; end; %macro dual; do i=rd0wk to (r0int-1); if job&L.wks>999 and alljobs>999 and dual8<1000 and dual7>999 and dual6>999 and dual5>999 and dual4>999 and dual3>999 and dual2>999 then dual8=job&L.wks; if job&L.wks>999 and alljobs>999 and dual7<1000 and dual6>999 and dual5>999 and dual4>999 and dual3>999 and dual2>999 then dual7=job&L.wks; if job&L.wks>999 and alljobs>999 and dual6<1000 and dual5>999 and dual4>999 and dual3>999 and dual2>999 then dual6=job&L.wks; if job&L.wks>999 and alljobs>999 and dual5<1000 and dual4>999 and dual3>999 and dual2>999 then dual5=job&L.wks; if job&L.wks>999 and alljobs>999 and dual4<1000 and dual3>999 and dual2>999 then dual4=job&L.wks; if job&L.wks>999 and alljobs>999 and dual3<1000 and dual2>999 then dual3=job&L.wks; if job&L.wks>999 and alljobs>999 and dual2<1000 then dual2=job&L.wks; if job&L.wks>999 and alljobs<1000 then alljobs=job&L.wks; if 00 and allhrs>-3 then allhrs=allhrs+hourwk2; if hourwk2>0 and allhrs=-4 then allhrs=hourwk2; if hourwk3 in (-6,-3,-2,-1) then allhrs=-3; if hourwk3>0 and allhrs>-3 then allhrs=allhrs+hourwk3; if hourwk3>0 and allhrs=-4 then allhrs=hourwk3; if hourwk4 in (-6,-3,-2,-1) then allhrs=-3; if hourwk4>0 and allhrs>-3 then allhrs=allhrs+hourwk4; if hourwk4>0 and allhrs=-4 then allhrs=hourwk4; if hourwk5 in (-6,-3,-2,-1) then allhrs=-3; if hourwk5>0 and allhrs>-3 then allhrs=allhrs+hourwk5; if hourwk5>0 and allhrs=-4 then allhrs=hourwk5; if hourwk6 in (-6,-3,-2,-1) then allhrs=-3; if hourwk6>0 and allhrs>-3 then allhrs=allhrs+hourwk6; if hourwk6>0 and allhrs=-4 then allhrs=hourwk6; if hourwk7 in (-6,-3,-2,-1) then allhrs=-3; if hourwk7>0 and allhrs>-3 then allhrs=allhrs+hourwk7; if hourwk7>0 and allhrs=-4 then allhrs=hourwk7; if hourwk8 in (-6,-3,-2,-1) then allhrs=-3; if hourwk8>0 and allhrs>-3 then allhrs=allhrs+hourwk8; if hourwk8>0 and allhrs=-4 then allhrs=hourwk8; if hourwk9 in (-6,-3,-2,-1) then allhrs=-3; if hourwk9>0 and allhrs>-3 then allhrs=allhrs+hourwk9; if hourwk9>0 and allhrs=-4 then allhrs=hourwk9; if hourwk10 in (-6,-3,-2,-1) then allhrs=-3; if hourwk10>0 and allhrs>-3 then allhrs=allhrs+hourwk10; if hourwk10>0 and allhrs=-4 then allhrs=hourwk10; end; ** Convert all codes after the current interview week to -5; do i=r0int to 2231; allhrs=-5; end; ** Convert all codes from week1 till the week before DLI to -4; do i=893 to rd0wk-1; allhrs=-4; end; data emp_btw; merge two emp_int(keep=pubid r0int) emp_week(keep=pubid back) emp_countweeks(keep=pubid rd0wk) emp_array(keep=pubid wks893-wks2231); by pubid; if r0int>-5; array alljobs (*) _1-_892 wks893-wks2231; * weekly job status array; array aftjobs (*) _1-_892 wks894-wks2232; * weekly job status array, forward one week; array E119000 (10) &E119000; *CHK TTL # WKS BJGAP 2021; array E119200 (10) &E119200; *# WKS LOOKING WRK/LYFF S-EMP BJOB GAP 2021; array gp_lthC (10) gp_lthC1-gp_lthC10; * CAPI - btw job gap length; array sr_lthC (10) sr_lthC1-sr_lthC10; * CAPI - btw job search length; array gp_lth (10) gp_lth1-gp_lth10; * EVENT - btw job gap length; array sr_lth (10) sr_lth1-sr_lth10; * EVENT - btw job search length; array gapb (10) gapb1-gapb10; * start week of a gap; array gape (10) gape1-gape10; * stop week of a gap; array olf_lth (10) olf_lth1-olf_lth10; * period of btw job gap out of labor force; array halfolf (10) halfolf1-halfolf10; * half of olf_lth; array unempb (10) unempb1-unempb10; * start week of unemployment period (search) in btw job gap; array unempe (10) unempe1-unempe10; * stop week of unemployment period (search) in btw job gap; do j=1 to 10; if E119000(j) ne . then gp_lthC(j)=E119000(j); if E119200(j) ne . then sr_lthC(j)=E119200(j); end; *** Initialize start and stop weeks of between job gaps; do j=1 to dim(gapb); gapb(j)=0; gape(j)=0; end; *** Define between job gaps from event history; do i=rd0wk; if alljobs(i)=0 then gapb1=i; end; do i=rd0wk to r0int-1; if alljobs(i) ne 0 and aftjobs(i)=0 and gapb1=0 then gapb1=i+1; if alljobs(i)=0 and aftjobs(i) ne 0 and gape1=0 then gape1=i; end; do j=1 to dim(gapb); if gapb(j)>0 then do; do i=gapb(j)+1 to r0int-1; if alljobs(i) ne 0 and aftjobs(i)=0 and gapb(j+1)=0 then gapb(j+1)=i+1; end; end; end; do j=1 to dim(gape); if gape(j)>0 and gapb(j+1)>0 then do; do i=gape(j)+1 to r0int-1; if alljobs(i)=0 and aftjobs(i) ne 0 and gape(j+1)=0 then gape(j+1)=i; end; end; end; * Find the last bjgap start this round, and if gapend missing set to r0int-1; bjlast=max(gapb1,gapb2,gapb3,gapb4,gapb5,gapb6,gapb7,gapb8,gapb9,gapb10); do j=1 to dim(gapb); if bjlast>0 and gapb(j)=bjlast and gape(j)=0 then gape(j)=r0int-1; end; drop _1-_892; *Incorporate search activity so that unemployed vs OLF can be determined for each bjgap; *Only need to do this for cases with job search activity; *Bjgaps=zero weeks (gp_lthC=0) are not on event history (gp_lth); *Bjgaps=one week (gp_lthC=1) may not be on event history (gp_lth); *Select sr_lthC as sr_lth for each gp_lth; search=0; do j=1 to dim(gapb); if gapb(j)>0 and gape(j)>0 and (gape(j)>=gapb(j)) then do; gp_lth(j)=((gape(j)-gapb(j))+1); if sr_lthC(j)>0 then search=search+sr_lthC(j); if sr_lthC(j) in (-1,-2) then search=sr_lthC(j); end; end; if search not in (.) then do; _cpzr=0; _cpzr1=0; end; do j=1 to dim(gapb); if gp_lthC(j)=0 and gp_lthC(j+1)>0 then _cpzr=_cpzr+1; if gp_lthC(j)=0 and gp_lthC(j+1)=0 and gp_lthC(j+2)>0 then _cpzr=_cpzr+1; if gp_lthC(j)=1 and gp_lth(j) ne gp_lthC(j) and gp_lthC(j+1)>1 then _cpzr1=_cpzr1+1; if gp_lthC(j)=1 and gp_lth(j) ne gp_lthC(j) and gp_lthC(j+1)=0 and gp_lthC(j+2)>1 then _cpzr1=_cpzr1+1; end; ** Get sr_lth from sr_lthC; do j=1 to dim(gapb); if _cpzr=0 and _cpzr1=0 and gp_lth(j)>0 then do; if sr_lthC(j) ge 0 then sr_lth(j)=sr_lthC(j); end; if _cpzr=1 and _cpzr1=0 and -2 le gp_lth(j)-gp_lthC(j) le 2 then do; if sr_lthC(j) ge 0 then sr_lth(j)=sr_lthC(j); end; if _cpzr=0 and _cpzr1=1 and -2 le gp_lth(j)-gp_lthC(j) le 2 then do; if sr_lthC(j) ge 0 then sr_lth(j)=sr_lthC(j); end; end; if _cpzr=1 and gp_lthC1=0 and gp_lthC2>0 and gp_lth2 ne gp_lthC2 and -2 le gp_lth1-gp_lthC2 le 2 then do; if sr_lthC2 ge 0 then sr_lth1=sr_lthC2; if sr_lthC3 ge 0 then sr_lth2=sr_lthC3; if sr_lthC4 ge 0 then sr_lth3=sr_lthC4; if sr_lthC5 ge 0 then sr_lth4=sr_lthC5; if sr_lthC6 ge 0 then sr_lth5=sr_lthC6; end; if _cpzr=1 and gp_lthC1=0 and gp_lth1 ne . and gp_lthC2>0 and gp_lth2 eq . and ((gp_lth1-gp_lthC2) gt 2|(gp_lth1-gp_lthC2) lt -2) then do; if sr_lthC2 ge 0 then sr_lth1=sr_lthC2; end; if _cpzr=1 and gp_lthC2=0 and -2 le gp_lth2-gp_lthC3 le 2 then do; if sr_lthC1 ge 0 then sr_lth1=sr_lthC1; if sr_lthC3 ge 0 then sr_lth2=sr_lthC3; if sr_lthC4 ge 0 then sr_lth3=sr_lthC4; end; if _cpzr=1 and gp_lthC3=0 and -2 le gp_lth3-gp_lthC4 le 2 then do; if sr_lthC1 ge 0 then sr_lth1=sr_lthC1; if sr_lthC2 ge 0 then sr_lth2=sr_lthC2; if sr_lthC4 ge 0 then sr_lth3=sr_lthC4; if sr_lthC5 ge 0 then sr_lth4=sr_lthC5; end; if _cpzr=1 and gp_lthC4=0 and -2 le gp_lth4-gp_lthC5 le 2 then do; if sr_lthC1 ge 0 then sr_lth1=sr_lthC1; if sr_lthC2 ge 0 then sr_lth2=sr_lthC2; if sr_lthC3 ge 0 then sr_lth3=sr_lthC3; if sr_lthC5 ge 0 then sr_lth4=sr_lthC5; if sr_lthC6 ge 0 then sr_lth5=sr_lthC6; if sr_lthC7 ge 0 then sr_lth6=sr_lthC7; end; if _cpzr=1 and gp_lthC1=0 and gp_lthC2=0 and -2 le gp_lth1-gp_lthC3 le 2 then do; if sr_lthC3 ge 0 then sr_lth1=sr_lthC3; end; if _cpzr=2 and gp_lthC1=0 and -2 le gp_lth1-gp_lthC2 le 2 and gp_lthC4=0 and -2 le gp_lth3-gp_lthC5 le 2 then do; if sr_lthC2 ge 0 then sr_lth1=sr_lthC2; if sr_lthC3 ge 0 then sr_lth2=sr_lthC3; if sr_lthC5 ge 0 then sr_lth3=sr_lthC5; end; if _cpzr=2 and gp_lthC1=0 and -2 le gp_lth1-gp_lthC2 le 2 and gp_lthC3=0 then do; if sr_lthC2 ge 0 then sr_lth1=sr_lthC2; if sr_lthC4 ge 0 then sr_lth2=sr_lthC4; end; if _cpzr=2 and gp_lthC1=0 and gp_lthC2=0 and -2 le gp_lth1-gp_lthC3 le 2 then do; if sr_lthC3 ge 0 then sr_lth1=sr_lthC3; if sr_lthC4 ge 0 then sr_lth2=sr_lthC4; end; if _cpzr=2 and gp_lthC2=0 and -2 le gp_lth2-gp_lthC3 le 2 and -2 le gp_lth3-gp_lthC4 le 2 then do; if sr_lthC1 ge 0 then sr_lth1=sr_lthC1; if sr_lthC3 ge 0 then sr_lth2=sr_lthC3; if sr_lthC4 ge 0 then sr_lth3=sr_lthC4; if sr_lthC5 ge 0 then sr_lth4=sr_lthC5; if sr_lthC6 ge 0 then sr_lth5=sr_lthC6; end; if _cpzr=2 and gp_lthC2=0 and gp_lthC3=0 and -2 le gp_lth2-gp_lthC4 le 2 then do; if sr_lthC1 ge 0 then sr_lth1=sr_lthC1; if sr_lthC4 ge 0 then sr_lth2=sr_lthC4; end; if _cpzr=2 and gp_lthC3=0 and -2 le gp_lth3-gp_lthC4 le 2 and gp_lthC5=0 and -2 le gp_lth4-gp_lthC6 le 2 then do; if sr_lthC1 ge 0 then sr_lth1=sr_lthC1; if sr_lthC2 ge 0 then sr_lth2=sr_lthC2; if sr_lthC4 ge 0 then sr_lth3=sr_lthC4; if sr_lthC6 ge 0 then sr_lth4=sr_lthC6; if sr_lthC7 ge 0 then sr_lth5=sr_lthC7; end; if _cpzr=3 and gp_lthC1=0 and gp_lthC3=0 and gp_lthC4=0 then do; if sr_lthC2 ge 0 then sr_lth1=sr_lthC2; if sr_lthC5 ge 0 then sr_lth2=sr_lthC5; if sr_lthC6 ge 0 then sr_lth3=sr_lthC6; end; if _cpzr=3 and _cpzr1=1 and gp_lthC1=0 and gp_lthC2=0 and gp_lthC4=0 and -2 le gp_lth2-gp_lthC6 le 2 then do; if sr_lthC3 ge 0 then sr_lth1=sr_lthC3; if sr_lthC6 ge 0 then sr_lth2=sr_lthC6; if sr_lthC7 ge 0 then sr_lth3=sr_lthC7; if sr_lthC8 ge 0 then sr_lth4=sr_lthC8; if sr_lthC9 ge 0 then sr_lth5=sr_lthC9; end; if _cpzr1=1 and gp_lthC1=1 and gp_lth2 ne gp_lthC2 and -2 le gp_lth1-gp_lthC2 le 2 then do; if sr_lthC2 ge 0 then sr_lth1=sr_lthC2; if sr_lthC3 ge 0 then sr_lth2=sr_lthC3; if sr_lthC4 ge 0 then sr_lth3=sr_lthC4; if sr_lthC5 ge 0 then sr_lth4=sr_lthC5; end; if _cpzr=0 and _cpzr1 in (1,2) and gp_lthC2=1 and -2 le gp_lth2-gp_lthC3 le 2 then do; if sr_lthC1 ge 0 then sr_lth1=sr_lthC1; if sr_lthC3 ge 0 then sr_lth2=sr_lthC3; if sr_lthC4 ge 0 then sr_lth3=sr_lthC4; if sr_lthC5 ge 0 then sr_lth4=sr_lthC5; if sr_lthC6 ge 0 then sr_lth5=sr_lthC6; end; if _cpzr=0 and _cpzr1 in (1,2) and gp_lthC4=1 and -2 le gp_lth4-gp_lthC5 le 2 then do; if sr_lthC1 ge 0 then sr_lth1=sr_lthC1; if sr_lthC2 ge 0 then sr_lth2=sr_lthC2; if sr_lthC3 ge 0 then sr_lth3=sr_lthC3; if sr_lthC5 ge 0 then sr_lth4=sr_lthC5; if sr_lthC6 ge 0 then sr_lth5=sr_lthC6; end; if _cpzr=1 and _cpzr1=1 and gp_lthC1=1 and gp_lthC2=0 and -2 le gp_lth1-gp_lthC3 le 2 then do; if sr_lthC3 ge 0 then sr_lth1=sr_lthC3; end; if _cpzr=1 and _cpzr1=1 and gp_lthC1=0 and gp_lthC3=1 and -2 le gp_lth1-gp_lthC2 le 2 then do; if sr_lthC2 ge 0 then sr_lth1=sr_lthC2; if sr_lthC4 ge 0 then sr_lth2=sr_lthC4; end; if _cpzr=1 and _cpzr1=1 and gp_lthC3=1 and gp_lthC4=0 and -2 le gp_lth3-gp_lthC5 le 2 then do; if sr_lthC5 ge 0 then sr_lth3=sr_lthC5; end; *** Code weeks of between job gaps as 0=No Information, 2=Not working (not sure whether unemployed or out of labor force), 4=unemployed, 5=out of labor force; do j=1 to dim(gapb); if gapb(j)>0 and gape(j)>0 and (gape(j)>=gapb(j)) then do; ** Code all weeks in the gap as 5 (OLF) by default; do i=gapb(j) to gape(j); alljobs(i)=5; end; ** R did not answer search questions, code all weeks in the gap as 2; if gp_lthC(j) in (-4,-3) or sr_lthC(j) in (-1,-2) then do; do i=gapb(j) to gape(j); alljobs(i)=2; end; end; ** Constrain search length by the gap length; if (0=sr_lth(j)>0 then do; olf_lth(j)=gp_lth(j)-sr_lth(j); halfolf(j)=((gp_lth(j)-sr_lth(j))/2); unempb(j)=floor(gapb(j)+halfolf(j)); unempe(j)=floor(gape(j)-halfolf(j)); end; ** Set unemployment in the btw job gaps; if unempe(j)>=unempb(j)>0 then do; do i=unempb(j) to unempe(j); alljobs(i)=4; end; end; end; end; ** Convert all codes after current interview week to -5; do i=(r0int) to (2231); alljobs(i)=-5; end; ** Convert all codes before DLI to -4; do i=893 to (rd0wk-1); alljobs(i)=-4; end; ** Convert all codes that are 0 to 2; do i=893 to 2231; if alljobs(i)=0 then alljobs(i)=2; end; ** Convert all codes that are -3 to 0; do i=893 to 2231; if alljobs(i)=-3 then alljobs(i)=0; end; data r20.current_; merge emp30_totwks(keep=pubid allwks selfwks empwks bcount) emp33_anhours(keep=pubid bhours) emp_int(keep=pubid r0int); by pubid; array miss allwks selfwks empwks; do over miss; if miss=. then miss=-5; end; data r20.emp_int; set emp_int; run; data r20.emp_week; set emp_week(keep=pubid dliwk bstar &starw &stopw &r0uid); data r20.emp29_numwks; set emp29_numwks(keep=pubid r0wks97-r0wks99 r0wks00-r0wks22 r0swks00-r0swks22 r0ewks97-r0ewks99 r0ewks00-r0ewks22); data r20.emp32_jobten; set emp32_jobten(keep=pubid r0ten1-r0ten10); data r20.emp33_anhours; set emp33_anhours(keep=pubid r0hrs97-r0hrs99 r0hrs00-r0hrs22 r0shrs00-r0shrs22 r0ehrs97-r0ehrs99 r0ehrs00-r0ehrs22 bhours hours01-hours10); data r20.emp34_wksage14; set emp34_wksage14(keep=pubid r0wksage14 r0ewksage14 r0wksage20 r0ewksage20); data r20.emp35_hrsage14; set emp35_hrsage14(keep=pubid r0hrsage14 r0ehrsage14 r0hrsage20 r0ehrsage20); data r20.emp36_numjobs; set emp36_numjobs(keep=pubid r0job97-r0job99 r0job00-r0job22 r0self97-r0self99 r0self00-r0self22 r0emp97-r0emp99 r0emp00-r0emp22 r0j9701--r0e2210); data r20.emp37_numjobs14; set emp37_numjobs14(keep=pubid r0empage14 r0jobage14 r0jobage20 r0empage20 r0e1401-r0e1410 r0j1401-r0j1410 r0e2001-r0e2010 r0j2001-r0j2010); data r20.emp_array_other; set emp_array (keep=pubid stawk01-stawk10 stowk01-stowk10 b1gawk1-b1gawk21 e1gawk1-e1gawk21 b2gawk1-b2gawk6 e2gawk1-e2gawk6 b3gawk1-b3gawk6 e3gawk1-e3gawk6 b4gawk1 e4gawk1 b5gawk1 e5gawk1 b7gawk1 e7gawk1 stayr01-stayr10 stoyr01-stoyr10 b1gayr1-b1gayr21 e1gayr1-e1gayr21 b2gayr1-b2gayr6 e2gayr1-e2gayr6 b3gayr1-b3gayr6 e3gayr1-e3gayr6 b4gayr1 e4gayr1 b5gayr1 e5gayr1 b7gayr1 e7gayr1 dl2_992-dl2_1014 dl2_1069-dl2_1070 dl2_1114-dl2_2230 dl3_1392 dl3_1425-dl3_1440 dl3_1486 dl3_1492-dl3_1538 dl3_1612 dl3_1672-dl3_1692 dl3_1827-dl3_1849 dl3_1879-dl3_2226 dl4_1505 dl4_2011-dl4_2190 dl5_2078-dl5_2088 dl5_2097-dl5_2107 dl5_2110-dl5_2135 dl5_2151-dl5_2185); proc means; run; data r20.emp_array_hrs; set emp_array_hrs(keep=pubid hr907-hr2231); data r20.emp_array_btw; set emp_btw(keep=pubid wks904-wks2231); run;