Core Employment Variables, Current Round section SAS Code for Variable Creation CALL SYMPUT ('E100000 ','YEMP_100000_01-YEMP_100000_07 E08-E11'); CALL SYMPUT ('E100100 ','YEMP_100100_01-YEMP_100100_07 E08-E11'); 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 E08-E11'); CALL SYMPUT ('E10020503 ','YEMP_100205_01_03 YEMP_100205_02_03 YEMP_100205_03_03 YEMP_100205_04_03 YEMP_100205_05_03 E06 E07-E11'); 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-E11'); CALL SYMPUT ('E10020505 ','YEMP_100205_01_05 YEMP_100205_02_05 YEMP_100205_03_05 YEMP_100205_04_05 YEMP_100205_05_05 E06-E11'); CALL SYMPUT ('E10020506 ','YEMP_100205_01_06 YEMP_100205_02_06 YEMP_100205_03_06 E04 YEMP_100205_05_06 E06-E11'); CALL SYMPUT ('E100214AAA02 ','YEMP_100214AAA_01_02 YEMP_100214AAA_02_02 E03-E11'); CALL SYMPUT ('E100214AAA03 ','YEMP_100214AAA_01_03 YEMP_100214AAA_02_03 E03 YEMP_100214AAA_04_03 E05-E11'); *CALL SYMPUT ('E100214AAA04 ','E01-E11'); CALL SYMPUT ('E100214AAA05 ','YEMP_100214AAA_01_05 YEMP_100214AAA_02_05 E03-E11'); *CALL SYMPUT ('E100214AAA06 ','E01-E11'); CALL SYMPUT ('E100214AAB02 ','YEMP_100214AAB_01_02 YEMP_100214AAB_02_02 E03-E11'); CALL SYMPUT ('E100214AAB03 ','YEMP_100214AAB_01_03 YEMP_100214AAB_02_03 E03 YEMP_100214AAB_04_03 E05-E11'); *CALL SYMPUT ('E100214AAB04 ','E01-E11'); CALL SYMPUT ('E100214AAB05 ','YEMP_100214AAB_01_05 YEMP_100214AAB_02_05 E03-E11'); *CALL SYMPUT ('E100214AAB06 ','E01-E11'); CALL SYMPUT ('E100214B02 ','YEMP_100214B_01_02 YEMP_100214B_02_02 YEMP_100214B_03_02 YEMP_100214B_04_02 E05 YEMP_100214B_06_02 YEMP_100214B_07_02 E08-E11'); CALL SYMPUT ('E100214B03 ','YEMP_100214B_01_03 E02 E03-E11'); CALL SYMPUT ('E100214B04 ','E01 YEMP_100214B_02_04 E03-E11'); CALL SYMPUT ('E100214B05 ','YEMP_100214B_01_05 E02 YEMP_100214B_03_05 E04-E11'); CALL SYMPUT ('E100214B06 ','E01 YEMP_100214B_02_06 E03-E11'); 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 E08-E11'); CALL SYMPUT ('E10021403 ','YEMP_100214_01_03 YEMP_100214_02_03 YEMP_100214_03_03 YEMP_100214_04_03 YEMP_100214_05_03 E06-E11'); 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-E11'); CALL SYMPUT ('E10021405 ','YEMP_100214_01_05 YEMP_100214_02_05 YEMP_100214_03_05 YEMP_100214_04_05 YEMP_100214_05_05 E06-E11'); CALL SYMPUT ('E10021406 ','YEMP_100214_01_06 YEMP_100214_02_06 YEMP_100214_03_06 E04 YEMP_100214_05_06 E06-E11'); CALL SYMPUT ('E101500 ','YEMP_101500_01-YEMP_101500_11'); 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 E06-E09 YEMP_102200_10_01_D E11'); 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 E06-E09 YEMP_102200_10_01_M E11'); 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 E06-E09 YEMP_102200_10_01_Y E11'); CALL SYMPUT ('E10240002D ','YEMP_102400_01_02_D YEMP_102400_02_02_D YEMP_102400_03_02_D YEMP_102400_04_02_D E05-E09 YEMP_102400_10_02_D E11'); CALL SYMPUT ('E10240002M ','YEMP_102400_01_02_M YEMP_102400_02_02_M YEMP_102400_03_02_M YEMP_102400_04_02_M E05-E09 YEMP_102400_10_02_M E11'); CALL SYMPUT ('E10240002Y ','YEMP_102400_01_02_Y YEMP_102400_02_02_Y YEMP_102400_03_02_Y YEMP_102400_04_02_Y E05-E09 YEMP_102400_10_02_Y E11'); CALL SYMPUT ('E10240003D ','YEMP_102400_01_03_D YEMP_102400_02_03_D YEMP_102400_03_03_D YEMP_102400_04_03_D E05-E11'); CALL SYMPUT ('E10240003M ','YEMP_102400_01_03_M YEMP_102400_02_03_M YEMP_102400_03_03_M YEMP_102400_04_03_M E05-E11'); CALL SYMPUT ('E10240003Y ','YEMP_102400_01_03_Y YEMP_102400_02_03_Y YEMP_102400_03_03_Y YEMP_102400_04_03_Y E05-E11'); CALL SYMPUT ('E10240004D ','YEMP_102400_01_04_D E02-E11'); CALL SYMPUT ('E10240004M ','YEMP_102400_01_04_M E02-E11'); CALL SYMPUT ('E10240004Y ','YEMP_102400_01_04_Y E02-E11'); CALL SYMPUT ('E10240005D ','YEMP_102400_01_05_D E02-E11'); CALL SYMPUT ('E10240005M ','YEMP_102400_01_05_M E02-E11'); CALL SYMPUT ('E10240005Y ','YEMP_102400_01_05_Y E02-E11'); CALL SYMPUT ('E10240006D ','YEMP_102400_01_06_D E02-E11'); CALL SYMPUT ('E10240006M ','YEMP_102400_01_06_M E02-E11'); CALL SYMPUT ('E10240006Y ','YEMP_102400_01_06_Y E02-E11'); CALL SYMPUT ('E10240007D ','YEMP_102400_01_07_D E02-E11'); CALL SYMPUT ('E10240007M ','YEMP_102400_01_07_M E02-E11'); CALL SYMPUT ('E10240007Y ','YEMP_102400_01_07_Y E02-E11'); 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 E06-E09 YEMP_102700_10_01_D E11'); 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 E06-E09 YEMP_102700_10_01_M E11'); 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 E06-E09 YEMP_102700_10_01_Y E11'); CALL SYMPUT ('E10270002D ','YEMP_102700_01_02_D YEMP_102700_02_02_D YEMP_102700_03_02_D YEMP_102700_04_02_D E05-E09 YEMP_102700_10_02_D E11'); CALL SYMPUT ('E10270002M ','YEMP_102700_01_02_M YEMP_102700_02_02_M YEMP_102700_03_02_M YEMP_102700_04_02_M E05-E09 YEMP_102700_10_02_M E11'); CALL SYMPUT ('E10270002Y ','YEMP_102700_01_02_Y YEMP_102700_02_02_Y YEMP_102700_03_02_Y YEMP_102700_04_02_Y E05-E09 YEMP_102700_10_02_Y E11'); CALL SYMPUT ('E10270003D ','YEMP_102700_01_03_D YEMP_102700_02_03_D YEMP_102700_03_03_D YEMP_102700_04_03_D E05-E11'); CALL SYMPUT ('E10270003M ','YEMP_102700_01_03_M YEMP_102700_02_03_M YEMP_102700_03_03_M YEMP_102700_04_03_M E05-E11'); CALL SYMPUT ('E10270003Y ','YEMP_102700_01_03_Y YEMP_102700_02_03_Y YEMP_102700_03_03_Y YEMP_102700_04_03_Y E05-E11'); CALL SYMPUT ('E10270004D ','YEMP_102700_01_04_D E02-E11'); CALL SYMPUT ('E10270004M ','YEMP_102700_01_04_M E02-E11'); CALL SYMPUT ('E10270004Y ','YEMP_102700_01_04_Y E02-E11'); CALL SYMPUT ('E10270005D ','YEMP_102700_01_05_D E02-E11'); CALL SYMPUT ('E10270005M ','YEMP_102700_01_05_M E02-E11'); CALL SYMPUT ('E10270005Y ','YEMP_102700_01_05_Y E02-E11'); CALL SYMPUT ('E10270006D ','YEMP_102700_01_06_D E02-E11'); CALL SYMPUT ('E10270006M ','YEMP_102700_01_06_M E02-E11'); CALL SYMPUT ('E10270006Y ','YEMP_102700_01_06_Y E02-E11'); CALL SYMPUT ('E10270007D ','YEMP_102700_01_07_D E02-E11'); CALL SYMPUT ('E10270007M ','YEMP_102700_01_07_M E02-E11'); CALL SYMPUT ('E10270007Y ','YEMP_102700_01_07_Y E02-E11'); CALL SYMPUT ('E103200 ', 'YEMP_103200_01-YEMP_103200_05 E06-E09 YEMP_103200_10 E11'); CALL SYMPUT ('E10370001 ','YEMP_103700_01_01 YEMP_103700_02_01 YEMP_103700_03_01 YEMP_103700_04_01 YEMP_103700_05_01 E06-E09 YEMP_103700_10_01 E11'); CALL SYMPUT ('E10370002 ','YEMP_103700_01_02 YEMP_103700_02_02 YEMP_103700_03_02 YEMP_103700_04_02 E05-E11'); CALL SYMPUT ('E10370003 ','YEMP_103700_01_03 YEMP_103700_02_03 YEMP_103700_03_03 YEMP_103700_04_03 E05-E11'); CALL SYMPUT ('E10370004 ','YEMP_103700_01_04 E02-E11'); CALL SYMPUT ('E10370005 ','YEMP_103700_01_05 E02-E11'); CALL SYMPUT ('E10370006 ','YEMP_103700_01_06 E02-E11'); CALL SYMPUT ('E10370007 ','YEMP_103700_01_07 E02-E11'); CALL SYMPUT ('E10540001 ', 'YEMP_105400_01_01 YEMP_105400_02_01 YEMP_105400_03_01 YEMP_105400_04_01 E05-E09 YEMP_105400_10_01 E11'); CALL SYMPUT ('E10540002 ', 'YEMP_105400_01_02 E02-E11'); *CALL SYMPUT ('E10540003 ', 'E01-E11'); CALL SYMPUT ('E105902 ', 'YEMP_105902_01-YEMP_105902_08 E09 YEMP_105902_10 E11'); CALL SYMPUT ('E10591201D ','YEMP_105912_01_01_D YEMP_105912_02_01_D YEMP_105912_03_01_D YEMP_105912_04_01_D E05-E06 YEMP_105912_07_01_D E08-E11'); CALL SYMPUT ('E10591201M ','YEMP_105912_01_01_M YEMP_105912_02_01_M YEMP_105912_03_01_M YEMP_105912_04_01_M E05-E06 YEMP_105912_07_01_M E08-E11'); CALL SYMPUT ('E10591201Y ','YEMP_105912_01_01_Y YEMP_105912_02_01_Y YEMP_105912_03_01_Y YEMP_105912_04_01_Y E05-E06 YEMP_105912_07_01_Y E08-E11'); CALL SYMPUT ('E10591402D ','YEMP_105914_01_02_D YEMP_105914_02_02_D E03 YEMP_105914_04_02_D E05-E11'); CALL SYMPUT ('E10591402M ','YEMP_105914_01_02_M YEMP_105914_02_02_M E03 YEMP_105914_04_02_M E05-E11'); CALL SYMPUT ('E10591402Y ','YEMP_105914_01_02_Y YEMP_105914_02_02_Y E03 YEMP_105914_04_02_Y E05-E11'); CALL SYMPUT ('E10591403D ','YEMP_105914_01_03_D YEMP_105914_02_03_D E03 YEMP_105914_04_03_D E05-E11'); CALL SYMPUT ('E10591403M ','YEMP_105914_01_03_M YEMP_105914_02_03_M E03 YEMP_105914_04_03_M E05-E11'); CALL SYMPUT ('E10591403Y ','YEMP_105914_01_03_Y YEMP_105914_02_03_Y E03 YEMP_105914_04_03_Y E05-E11'); CALL SYMPUT ('E10591404D ','YEMP_105914_01_04_D YEMP_105914_02_04_D E03-E11'); CALL SYMPUT ('E10591404M ','YEMP_105914_01_04_M YEMP_105914_02_04_M E03-E11'); CALL SYMPUT ('E10591404Y ','YEMP_105914_01_04_Y YEMP_105914_02_04_Y E03-E11'); CALL SYMPUT ('E10591405D ','YEMP_105914_01_05_D YEMP_105914_02_05_D E03-E11'); CALL SYMPUT ('E10591405M ','YEMP_105914_01_05_M YEMP_105914_02_05_M E03-E11'); CALL SYMPUT ('E10591405Y ','YEMP_105914_01_05_Y YEMP_105914_02_05_Y E03-E11'); CALL SYMPUT ('E10591406D ','YEMP_105914_01_06_D E02-E11'); CALL SYMPUT ('E10591406M ','YEMP_105914_01_06_M E02-E11'); CALL SYMPUT ('E10591406Y ','YEMP_105914_01_06_Y E02-E11'); CALL SYMPUT ('E10591407D ','YEMP_105914_01_07_D E02-E11'); CALL SYMPUT ('E10591407M ','YEMP_105914_01_07_M E02-E11'); CALL SYMPUT ('E10591407Y ','YEMP_105914_01_07_Y E02-E11'); CALL SYMPUT ('E10591408D ','YEMP_105914_01_08_D E02-E11'); CALL SYMPUT ('E10591408M ','YEMP_105914_01_08_M E02-E11'); CALL SYMPUT ('E10591408Y ','YEMP_105914_01_08_Y E02-E11'); CALL SYMPUT ('E10591409D ','YEMP_105914_01_09_D E02-E11'); CALL SYMPUT ('E10591409M ','YEMP_105914_01_09_M E02-E11'); CALL SYMPUT ('E10591409Y ','YEMP_105914_01_09_Y E02-E11'); CALL SYMPUT ('E10591410D ','YEMP_105914_01_10_D E02-E11'); CALL SYMPUT ('E10591410M ','YEMP_105914_01_10_M E02-E11'); CALL SYMPUT ('E10591410Y ','YEMP_105914_01_10_Y E02-E11'); CALL SYMPUT ('E10591601D ','YEMP_105916_01_01_D YEMP_105916_02_01_D YEMP_105916_03_01_D YEMP_105916_04_01_D E05-E06 YEMP_105916_07_01_D E08-E11'); CALL SYMPUT ('E10591601M ','YEMP_105916_01_01_M YEMP_105916_02_01_M YEMP_105916_03_01_M YEMP_105916_04_01_M E05-E06 YEMP_105916_07_01_M E08-E11'); CALL SYMPUT ('E10591601Y ','YEMP_105916_01_01_Y YEMP_105916_02_01_Y YEMP_105916_03_01_Y YEMP_105916_04_01_Y E05-E06 YEMP_105916_07_01_Y E08-E11'); CALL SYMPUT ('E10591602D ','YEMP_105916_01_02_D YEMP_105916_02_02_D E03 YEMP_105916_04_02_D E05-E11'); CALL SYMPUT ('E10591602M ','YEMP_105916_01_02_M YEMP_105916_02_02_M E03 YEMP_105916_04_02_M E05-E11'); CALL SYMPUT ('E10591602Y ','YEMP_105916_01_02_Y YEMP_105916_02_02_Y E03 YEMP_105916_04_02_Y E05-E11'); CALL SYMPUT ('E10591603D ','YEMP_105916_01_03_D YEMP_105916_02_03_D E03 YEMP_105916_04_03_D E05-E11'); CALL SYMPUT ('E10591603M ','YEMP_105916_01_03_M YEMP_105916_02_03_M E03 YEMP_105916_04_03_M E05-E11'); CALL SYMPUT ('E10591603Y ','YEMP_105916_01_03_Y YEMP_105916_02_03_Y E03 YEMP_105916_04_03_Y E05-E11'); CALL SYMPUT ('E10591604D ','YEMP_105916_01_04_D YEMP_105916_02_04_D E03-E11'); CALL SYMPUT ('E10591604M ','YEMP_105916_01_04_M YEMP_105916_02_04_M E03-E11'); CALL SYMPUT ('E10591604Y ','YEMP_105916_01_04_Y YEMP_105916_02_04_Y E03-E11'); CALL SYMPUT ('E10591605D ','YEMP_105916_01_05_D YEMP_105916_02_05_D E03-E11'); CALL SYMPUT ('E10591605M ','YEMP_105916_01_05_M YEMP_105916_02_05_M E03-E11'); CALL SYMPUT ('E10591605Y ','YEMP_105916_01_05_Y YEMP_105916_02_05_Y E03-E11'); CALL SYMPUT ('E10591606D ','YEMP_105916_01_06_D E02-E11'); CALL SYMPUT ('E10591606M ','YEMP_105916_01_06_M E02-E11'); CALL SYMPUT ('E10591606Y ','YEMP_105916_01_06_Y E02-E11'); CALL SYMPUT ('E10591607D ','YEMP_105916_01_07_D E02-E11'); CALL SYMPUT ('E10591607M ','YEMP_105916_01_07_M E02-E11'); CALL SYMPUT ('E10591607Y ','YEMP_105916_01_07_Y E02-E11'); CALL SYMPUT ('E10591608D ','YEMP_105916_01_08_D E02-E11'); CALL SYMPUT ('E10591608M ','YEMP_105916_01_08_M E02-E11'); CALL SYMPUT ('E10591608Y ','YEMP_105916_01_08_Y E02-E11'); CALL SYMPUT ('E10591609D ','YEMP_105916_01_09_D E02-E11'); CALL SYMPUT ('E10591609M ','YEMP_105916_01_09_M E02-E11'); CALL SYMPUT ('E10591609Y ','YEMP_105916_01_09_Y E02-E11'); CALL SYMPUT ('E10591610D ','YEMP_105916_01_10_D E02-E11'); CALL SYMPUT ('E10591610M ','YEMP_105916_01_10_M E02-E11'); CALL SYMPUT ('E10591610Y ','YEMP_105916_01_10_Y E02-E11'); CALL SYMPUT ('E105920 ', 'YEMP_105920_01-YEMP_105920_04 E05-E06 YEMP_105920_07 E08-E11'); CALL SYMPUT ('E10593801 ','YEMP_105938_01_01 YEMP_105938_02_01 YEMP_105938_03_01 YEMP_105938_04_01 E05-E06 YEMP_105938_07_01 E08-E11'); CALL SYMPUT ('E10593802 ','YEMP_105938_01_02 YEMP_105938_02_02 E03 YEMP_105938_04_02 E05-E11'); CALL SYMPUT ('E10593803 ','YEMP_105938_01_03 YEMP_105938_02_03 E03 YEMP_105938_04_03 E05-E11'); CALL SYMPUT ('E10593804 ','YEMP_105938_01_04 YEMP_105938_02_04 E03-E11'); CALL SYMPUT ('E10593805 ','YEMP_105938_01_05 YEMP_105938_02_05 E03-E11'); CALL SYMPUT ('E10593806 ','YEMP_105938_01_06 E02-E11'); CALL SYMPUT ('E10593807 ','YEMP_105938_01_07 E02-E11'); CALL SYMPUT ('E10593808 ','YEMP_105938_01_08 E02-E11'); CALL SYMPUT ('E10593809 ','YEMP_105938_01_09 E02-E11'); CALL SYMPUT ('E10593810 ','YEMP_105938_01_10 E02-E11'); CALL SYMPUT ('E10595001 ','YEMP_105950_01_01 YEMP_105950_02_01 YEMP_105950_03_01 E04-E06 YEMP_105950_07_01 E08-E11'); *CALL SYMPUT ('E10595002 ','YEMP_105950_01_02 E02 YEMP_105950_03_02 E04-E11'); CALL SYMPUT ('E119000 ','YEMP_119000_01-YEMP_119000_06 E07-E11'); CALL SYMPUT ('E119200 ','YEMP_119200_01-YEMP_119200_06 E07-E11'); CALL SYMPUT ('E119300 ','YEMP_119300_01-YEMP_119300_05 E06-E11'); CALL SYMPUT ('E19400 ', 'YEMP_19400_01-YEMP_19400_10 E11'); 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-E11'); 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-E11'); 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-E11'); 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-E11'); 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-E11'); 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-E11'); CALL SYMPUT ('E2160002 ','YEMP_21600_01_02 YEMP_21600_02_02 YEMP_21600_03_02 YEMP_21600_04_02 YEMP_21600_05_02 YEMP_21600_06_02 E07-E11'); CALL SYMPUT ('E2160003 ','YEMP_21600_01_03 YEMP_21600_02_03 YEMP_21600_03_03 YEMP_21600_04_03 YEMP_21600_05_03 YEMP_21600_06_03 E07-E11'); 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-E11'); CALL SYMPUT ('E2160005 ','YEMP_21600_01_05 YEMP_21600_02_05 YEMP_21600_03_05 E04-E05 YEMP_21600_06_05 E07-E11'); CALL SYMPUT ('E2160006 ','YEMP_21600_01_06 YEMP_21600_02_06 E03-E04 YEMP_21600_05_06 E06-E11'); CALL SYMPUT ('E2250002 ','YEMP_22500_01_02 YEMP_22500_02_02 YEMP_22500_03_02 YEMP_22500_04_02 YEMP_22500_05_02 YEMP_22500_06_02 E07-E11'); CALL SYMPUT ('E2250003 ','YEMP_22500_01_03 YEMP_22500_02_03 YEMP_22500_03_03 YEMP_22500_04_03 YEMP_22500_05_03 YEMP_22500_06_03 E07-E11'); 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-E11'); CALL SYMPUT ('E2250005 ','YEMP_22500_01_05 YEMP_22500_02_05 YEMP_22500_03_05 E04-E05 YEMP_22500_06_05 E07-E11'); CALL SYMPUT ('E2250006 ','YEMP_22500_01_06 YEMP_22500_02_06 E03-E04 YEMP_22500_05_06 E06-E11'); CALL SYMPUT ('E2253002 ','YEMP_22530_01_02 YEMP_22530_02_02 E03-E11'); CALL SYMPUT ('E2253003 ','YEMP_22530_01_03 YEMP_22530_02_03 YEMP_22530_03_03 E04-E11'); CALL SYMPUT ('E2253004 ','YEMP_22530_01_04 YEMP_22530_02_04 YEMP_22530_03_04 E04 E05 YEMP_22530_06_04 E07-E11'); CALL SYMPUT ('E2253005 ','YEMP_22530_01_05 YEMP_22530_02_05 E03-E11'); *CALL SYMPUT ('E2253006 ','YEMP_22530_01_06 E02-E11'); CALL SYMPUT ('E2253502 ','YEMP_22535_01_02 YEMP_22535_02_02 E03-E11'); CALL SYMPUT ('E2253503 ','YEMP_22535_01_03 YEMP_22535_02_03 YEMP_22535_03_03 E04-E11'); CALL SYMPUT ('E2253504 ','YEMP_22535_01_04 YEMP_22535_02_04 YEMP_22535_03_04 E04 E05 YEMP_22535_06_04 E07-E11'); CALL SYMPUT ('E2253505 ','YEMP_22535_01_05 YEMP_22535_02_05 E03-E11'); *CALL SYMPUT ('E2253506 ','YEMP_22535_01_06 E02-E11'); 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-E11'); CALL SYMPUT ('E2255003 ','E01 YEMP_22550_02_03 E03-E11'); CALL SYMPUT ('E2255004 ','YEMP_22550_01_04 E02-E11'); CALL SYMPUT ('E2255005 ','YEMP_22550_01_05 YEMP_22550_02_05 E03-E11'); CALL SYMPUT ('E2255006 ','YEMP_22550_01_06 E02-E11'); CALL SYMPUT ('E22900 ','YEMP_22900_01-YEMP_22900_07 E08-E11'); CALL SYMPUT ('E23000 ','YEMP_23000_01-YEMP_23000_08 E09 YEMP_23000_10 E11'); CALL SYMPUT ('E23200 ','YEMP_23200_01-YEMP_23200_05 E06 YEMP_23200_07 E08-E11'); CALL SYMPUT ('E23901 ','YEMP_23901_01-YEMP_23901_08 E09 YEMP_23901_10 E11'); CALL SYMPUT ('E24501 ','YEMP_24501_01-YEMP_24501_07 E08-E11'); CALL SYMPUT ('E24502 ','YEMP_24502_01-YEMP_24502_07 E08-E11'); CALL SYMPUT ('E24502A ','YEMP_24502A_01 E02 YEMP_24502A_03 E04-E11'); CALL SYMPUT ('E24514 ','YEMP_24514_01-YEMP_24514_04 E05 YEMP_24514_06 E07-E11'); CALL SYMPUT ('E24514B ','YEMP_24514B_01 E02-E11'); *CALL SYMPUT ('E24514AAB ','E01-E11'); *CALL SYMPUT ('E24514AABB ','E01-E11'); CALL SYMPUT ('E33400 ','YEMP_33400_01-YEMP_33400_10 E11'); CALL SYMPUT ('E33500 ','YEMP_33500_01-YEMP_33500_06 E07-E11'); CALL SYMPUT ('E33600 ','YEMP_33600_01-YEMP_33600_05 E06 YEMP_33600_07 E08 E09 YEMP_33600_10 E11'); CALL SYMPUT ('E34402AAB ','YEMP_34402AAB_01-YEMP_34402AAB_05 E06-E11'); CALL SYMPUT ('E34402AAD ','YEMP_34402AAD_01-YEMP_34402AAD_05 E06-E11'); CALL SYMPUT ('E34402AB ','YEMP_34402AB_01-YEMP_34402AB_06 E07-E11'); CALL SYMPUT ('E34402 ','YEMP_34402_01-YEMP_34402_10 E11'); CALL SYMPUT ('E34403 ','YEMP_34403_01-YEMP_34403_06 E07-E11'); CALL SYMPUT ('E34404A ','YEMP_34404A_01 E02-E11'); CALL SYMPUT ('E34404 ','YEMP_34404_01-YEMP_34404_06 E07-E11'); CALL SYMPUT ('E34413CC ','YEMP_34413CC_01 E02-E05 YEMP_34413CC_06 E07-E11'); CALL SYMPUT ('E34413CD ','YEMP_34413CD_01 E02-E05 YEMP_34413CD_06 E07-E11'); CALL SYMPUT ('E34413C ','YEMP_34413C_01-YEMP_34413C_06 E07-E11'); CALL SYMPUT ('E34413E ','YEMP_34413E_01 YEMP_34413E_02 E03-E11'); CALL SYMPUT ('E34428 ','YEMP_34428_01-YEMP_34428_06 E07-E11'); *CALL SYMPUT ('E34430 ','E01-E11'); CALL SYMPUT ('E35600 ','YEMP_35600_01-YEMP_35600_10 E11'); CALL SYMPUT ('E36100 ','YEMP_36100_01-YEMP_36100_06 E07-E11'); CALL SYMPUT ('E36200 ','YEMP_36200_01-YEMP_36200_10 E11'); CALL SYMPUT ('E37701 ','YEMP_37701_01-YEMP_37701_10 E11'); CALL SYMPUT ('E37901B ','YEMP_37901B_01-YEMP_37901B_10 E11'); CALL SYMPUT ('E37904 ','YEMP_37904_01-YEMP_37904_06 E07 YEMP_37904_08 E09-E11'); CALL SYMPUT ('E38000B ','YEMP_38000B_01-YEMP_38000B_10 E11'); CALL SYMPUT ('E38000F ','YEMP_38000F_01-YEMP_38000F_07 E08-E11'); CALL SYMPUT ('E38002 ','YEMP_38002_01-YEMP_38002_05 E06-E11'); CALL SYMPUT ('E38003 ','YEMP_38003_01-YEMP_38003_05 E06-E11'); *CALL SYMPUT ('E38012AAA ','E01-E11'); *CALL SYMPUT ('E38012AAB ','E01-E11'); *CALL SYMPUT ('E38012B ','E01-E11'); CALL SYMPUT ('E38012 ','YEMP_38012_01-YEMP_38012_05 E06-E11'); CALL SYMPUT ('E38013B ','YEMP_38013B_01-YEMP_38013B_02 E03-E11'); CALL SYMPUT ('E38013 ','YEMP_38013_01-YEMP_38013_10 E11'); CALL SYMPUT ('E38014 ','YEMP_38014_01-YEMP_38014_10 E11'); CALL SYMPUT ('E38023 ','YEMP_38023_01-YEMP_38023_07 E08 YEMP_38023_09 YEMP_38023_10 E11'); CALL SYMPUT ('E38024B ','YEMP_38024B_01-YEMP_38024B_03 E04-E11'); CALL SYMPUT ('E38024C ','YEMP_38024C_01-YEMP_38024C_03 E04-E11'); CALL SYMPUT ('E38027 ','YEMP_38027_01-YEMP_38027_03 E04-E11'); CALL SYMPUT ('E38102 ','YEMP_38102_01-YEMP_38102_04 E05 YEMP_38102_06 E07-E11'); CALL SYMPUT ('E38103 ','YEMP_38103_01-YEMP_38103_04 E05 YEMP_38103_06 E07-E11'); CALL SYMPUT ('E38105 ','YEMP_38105_01-YEMP_38105_04 E05 YEMP_38105_06 E07-E11'); CALL SYMPUT ('E38106 ','YEMP_38106_01-YEMP_38106_04 E05 YEMP_38106_06 E07-E11'); CALL SYMPUT ('E38107 ','YEMP_38107_01-YEMP_38107_04 E05 YEMP_38107_06 E07-E11'); CALL SYMPUT ('E38116AAA ','YEMP_38116AAA_01 E02-E11'); CALL SYMPUT ('E38116AAB ','YEMP_38116AAB_01 E02-E11'); CALL SYMPUT ('E38116B ','YEMP_38116B_01 E02-E11'); CALL SYMPUT ('E38116 ','YEMP_38116_01-YEMP_38116_04 E05 YEMP_38116_06 E07-E11'); CALL SYMPUT ('E38201 ','YEMP_38201_01-YEMP_38201_04 E05 YEMP_38201_06 E07-E11'); CALL SYMPUT ('E38202 ','YEMP_38202_01-YEMP_38202_04 E05 YEMP_38202_06 E07-E11'); CALL SYMPUT ('E38211 ','YEMP_38211_01-YEMP_38211_04 E05 YEMP_38211_06 E07-E11'); CALL SYMPUT ('E38329B ','YEMP_38329B_01-YEMP_38329B_05 E06-E11'); CALL SYMPUT ('E38329D ','YEMP_38329D_01-YEMP_38329D_05 E06-E11'); CALL SYMPUT ('E38329IB ','YEMP_38329IB_01 E02 YEMP_38329IB_03 E04-E11'); CALL SYMPUT ('E38329I ','YEMP_38329I_01 E02 YEMP_38329I_03 E04-E11'); CALL SYMPUT ('E38329K ','YEMP_38329K_01 YEMP_38329K_02 E03-E11'); CALL SYMPUT ('E3840701 ','YEMP_38407_01_01 YEMP_38407_02_01 YEMP_38407_03_01 YEMP_38407_04_01 E05-E11'); CALL SYMPUT ('E3840702 ','YEMP_38407_01_02 YEMP_38407_02_02 YEMP_38407_03_02 E04 YEMP_38407_05_02 E06-E11'); CALL SYMPUT ('E3840703 ','YEMP_38407_01_03 YEMP_38407_02_03 YEMP_38407_03_03 E04-E11'); CALL SYMPUT ('E3840704 ','YEMP_38407_01_04 E02 YEMP_38407_03_04 E04-E11'); CALL SYMPUT ('E3840705 ','YEMP_38407_01_05 YEMP_38407_02_05 E03-E11'); CALL SYMPUT ('E38416IB01 ','YEMP_38416IB_01_01 E02-E11'); *CALL SYMPUT ('E38416IB02 ','E01-E11'); CALL SYMPUT ('E38416IB03 ','YEMP_38416IB_01_03 YEMP_38416IB_02_03 E03-E11'); *CALL SYMPUT ('E38416IB04 ','E01-E11'); *CALL SYMPUT ('E38416IB05 ','E01-E11'); CALL SYMPUT ('E38416ID01 ','YEMP_38416ID_01_01 E02-E11'); *CALL SYMPUT ('E38416ID02 ','E01-E11'); CALL SYMPUT ('E38416ID03 ','YEMP_38416ID_01_03 YEMP_38416ID_02_03 E03-E11'); *CALL SYMPUT ('E38416ID04 ','E01-E11'); *CALL SYMPUT ('E38416ID05 ','E01-E11'); CALL SYMPUT ('E38416I01 ','YEMP_38416I_01_01 E02-E11'); *CALL SYMPUT ('E38416I02 ','E01-E11'); CALL SYMPUT ('E38416I03 ','YEMP_38416I_01_03 YEMP_38416I_02_03 E03-E11'); *CALL SYMPUT ('E38416I04 ','E01-E11'); *CALL SYMPUT ('E38416I05 ','E01-E11'); CALL SYMPUT ('E38416K01 ','YEMP_38416K_01_01 YEMP_38416K_02_01 E03-E11'); CALL SYMPUT ('E38416K02 ','YEMP_38416K_01_02 E02-E11'); CALL SYMPUT ('E38416K03 ','YEMP_38416K_01_03 E02-E11'); CALL SYMPUT ('E38416K04 ','YEMP_38416K_01_04 E02-E11'); *CALL SYMPUT ('E38416K05 ','E01-E11'); CALL SYMPUT ('E3841601 ','YEMP_38416_01_01 YEMP_38416_02_01 YEMP_38416_03_01 YEMP_38416_04_01 E05-E11'); CALL SYMPUT ('E3841602 ','YEMP_38416_01_02 YEMP_38416_02_02 YEMP_38416_03_02 E04 YEMP_38416_05_02 E06-E11'); CALL SYMPUT ('E3841603 ','YEMP_38416_01_03 YEMP_38416_02_03 YEMP_38416_03_03 E04-E11'); CALL SYMPUT ('E3841604 ','YEMP_38416_01_04 E02 YEMP_38416_03_04 E04-E11'); CALL SYMPUT ('E3841605 ','YEMP_38416_01_05 YEMP_38416_02_05 E03-E11'); CALL SYMPUT ('E58201 ','YEMP_58201_01-YEMP_58201_09 E10 YEMP_58201_11'); CALL SYMPUT ('E58401 ','YEMP_58401_01-YEMP_58401_11'); CALL SYMPUT ('E59900 ','YEMP_59900_01-YEMP_59900_09 E10 YEMP_59900_11'); CALL SYMPUT ('E59901 ','YEMP_59901_01-YEMP_59901_05 E06 YEMP_59901_07 E08 YEMP_59901_09 E10 E11'); CALL SYMPUT ('E83100 ','YEMP_83100_01-YEMP_83100_08 E09 E10 YEMP_83100_11'); CALL SYMPUT ('E83300 ','YEMP_83300_01-YEMP_83300_08 E09 E10 YEMP_83300_11'); CALL SYMPUT ('E86800 ','YEMP_86800_01-YEMP_86800_08 E09-E11'); CALL SYMPUT ('E86900 ','YEMP_86900_01-YEMP_86900_07 E08-E11'); CALL SYMPUT ('E87100 ','YEMP_87100_01-YEMP_87100_05 E06 E07 YEMP_87100_08 E09-E11'); CALL SYMPUT ('E88000 ','YEMP_88000_01-YEMP_88000_08 E09-E11'); CALL SYMPUT ('E88501 ','YEMP_88501_01-YEMP_88501_05 E06-E07 YEMP_88501_08 E09-E11'); CALL SYMPUT ('E88502A ','YEMP_88502A_01 YEMP_88502A_02 E03-E11'); CALL SYMPUT ('E88502 ','YEMP_88502_01-YEMP_88502_05 E06-E07 YEMP_88502_08 E09-E11'); CALL SYMPUT ('E88512 ','YEMP_88512_01-YEMP_88512_04 E05-E11'); CALL SYMPUT ('E97300 ','YEMP_97300_01-YEMP_97300_07 E08-E10 YEMP_97300_11'); CALL SYMPUT ('E97400 ','YEMP_97400_01-YEMP_97400_07 E08-E11'); CALL SYMPUT ('E97500 ','YEMP_97500_01-YEMP_97500_07 E08-E11'); CALL SYMPUT ('E98300 ','YEMP_98300_01-YEMP_98300_04 E05 E06 YEMP_98300_07 E08-E11'); CALL SYMPUT ('E98402CAA ','YEMP_98402CAA_01-YEMP_98402CAA_07 E08-E11'); CALL SYMPUT ('E98402CAB ','YEMP_98402CAB_01-YEMP_98402CAB_07 E08-E11'); CALL SYMPUT ('E98402D ','YEMP_98402D_01-YEMP_98402D_03 E04-E06 YEMP_98402D_07 E08-E11'); CALL SYMPUT ('E98402 ','YEMP_98402_01-YEMP_98402_07 E08-E10 YEMP_98402_11'); CALL SYMPUT ('E98403 ','YEMP_98403_01-YEMP_98403_04 E05 YEMP_98403_06 E07-E11'); CALL SYMPUT ('E98404ABX ','YEMP_98404ABX_01 E02-E11'); CALL SYMPUT ('E98404A ','YEMP_98404A_01-YEMP_98404A_04 E05 YEMP_98404A_06 E07-E11'); *CALL SYMPUT ('E98414AAA ','E01-E11'); *CALL SYMPUT ('E98414AAB ','E01-E11'); *CALL SYMPUT ('E98414B ','E01-E11'); CALL SYMPUT ('E98414 ','YEMP_98414_01-YEMP_98414_04 E05-E11'); CALL SYMPUT ('E98429 ','YEMP_98429_01-YEMP_98429_04 E05 YEMP_98429_06 E07-E11'); CALL SYMPUT ('E9899M ','YEMP_9899M_01-YEMP_9899M_04 E05-E11'); CALL SYMPUT ('E99500 ','YEMP_99500_01-YEMP_99500_07 E08-E10 YEMP_99500_11'); CALL SYMPUT ('R0CUR ','YEMP_CURFLAG_01-YEMP_CURFLAG_11'); CALL SYMPUT ('R0MIL ','YEMP_MILFLAG_01-YEMP_MILFLAG_11'); CALL SYMPUT ('R0SEL ','YEMP_SELFEMP_01-YEMP_SELFEMP_11'); CALL SYMPUT ('R0UID ','YEMP_UID_01-YEMP_UID_11'); CALL SYMPUT ('R0STAD ','YEMP_STARTDATE_D_01-YEMP_STARTDATE_D_11'); CALL SYMPUT ('R0STAM ','YEMP_STARTDATE_M_01-YEMP_STARTDATE_M_11'); CALL SYMPUT ('R0STAY ','YEMP_STARTDATE_Y_01-YEMP_STARTDATE_Y_11'); CALL SYMPUT ('R0STOD ','YEMP_STOPDATE_D_01-YEMP_STOPDATE_D_11'); CALL SYMPUT ('R0STOM ','YEMP_STOPDATE_M_01-YEMP_STOPDATE_M_11'); CALL SYMPUT ('R0STOY ','YEMP_STOPDATE_Y_01-YEMP_STOPDATE_Y_11'); CALL SYMPUT ('E10240008D ','E01-E11'); CALL SYMPUT ('E10240008M ','E01-E11'); CALL SYMPUT ('E10240008Y ','E01-E11'); CALL SYMPUT ('E10240009D ','E01-E11'); CALL SYMPUT ('E10240009M ','E01-E11'); CALL SYMPUT ('E10240009Y ','E01-E11'); CALL SYMPUT ('E10240010D ','E01-E11'); CALL SYMPUT ('E10240010M ','E01-E11'); CALL SYMPUT ('E10240010Y ','E01-E11'); CALL SYMPUT ('E10270008D ','E01-E11'); CALL SYMPUT ('E10270008M ','E01-E11'); CALL SYMPUT ('E10270008Y ','E01-E11'); CALL SYMPUT ('E10270009D ','E01-E11'); CALL SYMPUT ('E10270009M ','E01-E11'); CALL SYMPUT ('E10270009Y ','E01-E11'); CALL SYMPUT ('E10270010D ','E01-E11'); CALL SYMPUT ('E10270010M ','E01-E11'); CALL SYMPUT ('E10270010Y ','E01-E11'); CALL SYMPUT ('STARD ','STARD01-STARD11'); CALL SYMPUT ('STARM ','STARM01-STARM11'); CALL SYMPUT ('STARY ','STARY01-STARY11'); CALL SYMPUT ('STOPD ','STOPD01-STOPD11'); CALL SYMPUT ('STOPM ','STOPM01-STOPM11'); CALL SYMPUT ('STOPY ','STOPY01-STOPY11'); CALL SYMPUT ('STARW ','STARW01-STARW11'); CALL SYMPUT ('STOPW ','STOPW01-STOPW11'); CALL SYMPUT ('SMOF ','SMOF01-SMOF11'); CALL SYMPUT ('EMOF ','EMOF01-EMOF11'); CALL SYMPUT ('BGFL_01 ','BGFL01_01 BGFL02_01 BGFL03_01 BGFL04_01 BGFL05_01 BGFL06_01 BGFL07_01 E08-E09 BGFL10_01 E11'); CALL SYMPUT ('BGFL_02 ','BGFL01_02 BGFL02_02 BGFL03_02 BGFL04_02 E05-E09 BGFL10_02 E11'); CALL SYMPUT ('BGFL_03 ','BGFL01_03 BGFL02_03 BGFL03_03 BGFL04_03 E05-E11'); CALL SYMPUT ('BGFL_04 ','BGFL01_04 BGFL02_04 E03-E11'); CALL SYMPUT ('BGFL_05 ','BGFL01_05 BGFL02_05 E03-E11'); CALL SYMPUT ('BGFL_06 ','BGFL01_06 E02-E11'); CALL SYMPUT ('BGFL_07 ','BGFL01_07 E02-E11'); CALL SYMPUT ('BGFL_08 ','BGFL01_08 E02-E11'); CALL SYMPUT ('BGFL_09 ','BGFL01_09 E02-E11'); CALL SYMPUT ('BGFL_10 ','BGFL01_10 E02-E11'); CALL SYMPUT ('EGFL_01 ','EGFL01_01 EGFL02_01 EGFL03_01 EGFL04_01 EGFL05_01 EGFL06_01 EGFL07_01 E08-E09 EGFL10_01 E11'); CALL SYMPUT ('EGFL_02 ','EGFL01_02 EGFL02_02 EGFL03_02 EGFL04_02 E05-E09 EGFL10_02 E11'); CALL SYMPUT ('EGFL_03 ','EGFL01_03 EGFL02_03 EGFL03_03 EGFL04_03 E05-E11'); CALL SYMPUT ('EGFL_04 ','EGFL01_04 EGFL02_04 E03-E11'); CALL SYMPUT ('EGFL_05 ','EGFL01_05 EGFL02_05 E03-E11'); CALL SYMPUT ('EGFL_06 ','EGFL01_06 E02-E11'); CALL SYMPUT ('EGFL_07 ','EGFL01_07 E02-E11'); CALL SYMPUT ('EGFL_08 ','EGFL01_08 E02-E11'); CALL SYMPUT ('EGFL_09 ','EGFL01_09 E02-E11'); CALL SYMPUT ('EGFL_10 ','EGFL01_10 E02-E11'); CALL SYMPUT ('BGAP_01 ','BGAP01_01 BGAP02_01 BGAP03_01 BGAP04_01 BGAP05_01 BGAP06_01 BGAP07_01 E08-E09 BGAP10_01 E11'); CALL SYMPUT ('BGAP_02 ','BGAP01_02 BGAP02_02 BGAP03_02 BGAP04_02 E05-E09 BGAP10_02 E11'); CALL SYMPUT ('BGAP_03 ','BGAP01_03 BGAP02_03 BGAP03_03 BGAP04_03 E05-E11'); CALL SYMPUT ('BGAP_04 ','BGAP01_04 BGAP02_04 E03-E11'); CALL SYMPUT ('BGAP_05 ','BGAP01_05 BGAP02_05 E03-E11'); CALL SYMPUT ('BGAP_06 ','BGAP01_06 E02-E11'); CALL SYMPUT ('BGAP_07 ','BGAP01_07 E02-E11'); CALL SYMPUT ('BGAP_08 ','BGAP01_08 E02-E11'); CALL SYMPUT ('BGAP_09 ','BGAP01_09 E02-E11'); CALL SYMPUT ('BGAP_10 ','BGAP01_10 E02-E11'); CALL SYMPUT ('EGAP_01 ','EGAP01_01 EGAP02_01 EGAP03_01 EGAP04_01 EGAP05_01 EGAP06_01 EGAP07_01 E08-E09 EGAP10_01 E11'); CALL SYMPUT ('EGAP_02 ','EGAP01_02 EGAP02_02 EGAP03_02 EGAP04_02 E05-E09 EGAP10_02 E11'); CALL SYMPUT ('EGAP_03 ','EGAP01_03 EGAP02_03 EGAP03_03 EGAP04_03 E05-E11'); CALL SYMPUT ('EGAP_04 ','EGAP01_04 EGAP02_04 E03-E11'); CALL SYMPUT ('EGAP_05 ','EGAP01_05 EGAP02_05 E03-E11'); CALL SYMPUT ('EGAP_06 ','EGAP01_06 E02-E11'); CALL SYMPUT ('EGAP_07 ','EGAP01_07 E02-E11'); CALL SYMPUT ('EGAP_08 ','EGAP01_08 E02-E11'); CALL SYMPUT ('EGAP_09 ','EGAP01_09 E02-E11'); CALL SYMPUT ('EGAP_10 ','EGAP01_10 E02-E11'); CALL SYMPUT ('_BGMDY_01 ','_BGMDY01_01 _BGMDY02_01 _BGMDY03_01 _BGMDY04_01 _BGMDY05_01 _BGMDY06_01 _BGMDY07_01 E08-E09 _BGMDY10_01 E11'); CALL SYMPUT ('_BGMDY_02 ','_BGMDY01_02 _BGMDY02_02 _BGMDY03_02 _BGMDY04_02 E05-E09 _BGMDY10_02 E11'); CALL SYMPUT ('_BGMDY_03 ','_BGMDY01_03 _BGMDY02_03 _BGMDY03_03 _BGMDY04_03 E05-E11'); CALL SYMPUT ('_BGMDY_04 ','_BGMDY01_04 _BGMDY02_04 E03-E11'); CALL SYMPUT ('_BGMDY_05 ','_BGMDY01_05 _BGMDY02_05 E03-E11'); CALL SYMPUT ('_BGMDY_06 ','_BGMDY01_06 E02-E11'); CALL SYMPUT ('_BGMDY_07 ','_BGMDY01_07 E02-E11'); CALL SYMPUT ('_BGMDY_08 ','_BGMDY01_08 E02-E11'); CALL SYMPUT ('_BGMDY_09 ','_BGMDY01_09 E02-E11'); CALL SYMPUT ('_BGMDY_10 ','_BGMDY01_10 E02-E11'); CALL SYMPUT ('_EGMDY_01 ','_EGMDY01_01 _EGMDY02_01 _EGMDY03_01 _EGMDY04_01 _EGMDY05_01 _EGMDY06_01 _EGMDY07_01 E08-E09 _EGMDY10_01 E11'); CALL SYMPUT ('_EGMDY_02 ','_EGMDY01_02 _EGMDY02_02 _EGMDY03_02 _EGMDY04_02 E05-E09 _EGMDY10_02 E11'); CALL SYMPUT ('_EGMDY_03 ','_EGMDY01_03 _EGMDY02_03 _EGMDY03_03 _EGMDY04_03 E05-E11'); CALL SYMPUT ('_EGMDY_04 ','_EGMDY01_04 _EGMDY02_04 E03-E11'); CALL SYMPUT ('_EGMDY_05 ','_EGMDY01_05 _EGMDY02_05 E03-E11'); CALL SYMPUT ('_EGMDY_06 ','_EGMDY01_06 E02-E11'); CALL SYMPUT ('_EGMDY_07 ','_EGMDY01_07 E02-E11'); CALL SYMPUT ('_EGMDY_08 ','_EGMDY01_08 E02-E11'); CALL SYMPUT ('_EGMDY_09 ','_EGMDY01_09 E02-E11'); CALL SYMPUT ('_EGMDY_10 ','_EGMDY01_10 E02-E11'); CALL SYMPUT ('_gdays_01 ','_gdays01_01 _gdays02_01 _gdays03_01 _gdays04_01 _gdays05_01 _gdays06_01 _gdays07_01 E08-E09 _gdays10_01 E11'); CALL SYMPUT ('_gdays_02 ','_gdays01_02 _gdays02_02 _gdays03_02 _gdays04_02 E05-E09 _gdays10_02 E11'); CALL SYMPUT ('_gdays_03 ','_gdays01_03 _gdays02_03 _gdays03_03 _gdays04_03 E05-E11'); CALL SYMPUT ('_gdays_04 ','_gdays01_04 _gdays02_04 E03-E11'); CALL SYMPUT ('_gdays_05 ','_gdays01_05 _gdays02_05 E03-E11'); CALL SYMPUT ('_gdays_06 ','_gdays01_06 E02-E11'); CALL SYMPUT ('_gdays_07 ','_gdays01_07 E02-E11'); CALL SYMPUT ('_gdays_08 ','_gdays01_08 E02-E11'); CALL SYMPUT ('_gdays_09 ','_gdays01_09 E02-E11'); CALL SYMPUT ('_gdays_10 ','_gdays01_10 E02-E11'); run; data emp_int; merge two(keep=pubid CV_INTERVIEW_DATE_D CV_INTERVIEW_DATE_M CV_INTERVIEW_DATE_Y) r19.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"; r0int_d=CV_INTERVIEW_DATE_D; label r0int_d = "CV_INTERVIEW_DATE 2019"; r0int_m=CV_INTERVIEW_DATE_M; label r0int_m = "CV_INTERVIEW_DATE 2019"; r0int_y=CV_INTERVIEW_DATE_Y; label r0int_y = "CV_INTERVIEW_DATE 2019"; 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; 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_R19'; 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: ; 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; 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; 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; array intwk r1int -- r13int r14int r15int r16int r17int r18int; 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-starm11; array startd (j) stard01-stard11; array starty (j) stary01-stary11; array stopm (j) stopm01-stopm11; array stopd (j) stopd01-stopd11; array stopy (j) stopy01-stopy11; array smofl (j) smof01-smof11; * dummy=1 when start month imputed; array emofl (j) emof01-emof11; * dummy=1 when stop month imputed; array _strmdy (j) _strmdy01-_strmdy11; array _stpmdy (j) _stpmdy01-_stpmdy11; array _startwk (j) starw01-starw11; array _stopwk (j) stopw01-stopw11; 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); 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'; do j=1 to 11; 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); 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<201900 and _startwk>0 and dliwk>_startwk then _startwk=dliwk; *if 9701 le uid<200900 and _stopwk>0 and dliwk>_stopwk then _stopwk=dliwk; 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; do j=1 to 11; if uid ge 9701 then do; startm=ostartm; startd=ostartd; starty=ostarty; stopm=ostopm; stopd=ostopd; stopy=ostopy; end; end; 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; 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; do j=1 to 11; 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; array bself (j) bself01-bself11; 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; do over UID; if milflag ne 1 and uid>201900 then do; 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-bstar11; back=0; do over UID; if milflag ne 1 and uid>201900 and _startwk0 and dliwk>0 then do; back=back+1; bstart=_startwk; end; end; bstar=min(of bstar01-bstar11); label bstar='earliest start week'; do j=1 to 11; 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; run; data emp_gaps; merge two emp_bday emp_int emp_week; by pubid; if r0int>-5; * ENT BEG DATE (SELF-EMP WJGAP),1 ENT BEG DT +1 GAP S-EMP WJGAP,2-10; array sbgdy &E10591201D &E10591402D &E10591403D &E10591404D &E10591405D &E10591406D &E10591407D &E10591408D &E10591409D &E10591410D; array sbgmo &E10591201M &E10591402M &E10591403M &E10591404M &E10591405M &E10591406M &E10591407M &E10591408M &E10591409M &E10591410M; array sbgyr &E10591201Y &E10591402Y &E10591403Y &E10591404Y &E10591405Y &E10591406Y &E10591407Y &E10591408Y &E10591409Y &E10591410Y; array segdy &E10591601D &E10591602D &E10591603D &E10591604D &E10591605D &E10591606D &E10591607D &E10591608D &E10591609D &E10591610D; array segmo &E10591601M &E10591602M &E10591603M &E10591604M &E10591605M &E10591606M &E10591607M &E10591608M &E10591609M &E10591610M; array segyr &E10591601Y &E10591602Y &E10591603Y &E10591604Y &E10591605Y &E10591606Y &E10591607Y &E10591608Y &E10591609Y &E10591610Y; * 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; array bgmo &E10220001M &E10240002M &E10240003M &E10240004M &E10240005M &E10240006M &E10240007M &E10240008M &E10240009M &E10240010M; array bgyr &E10220001Y &E10240002Y &E10240003Y &E10240004Y &E10240005Y &E10240006Y &E10240007Y &E10240008Y &E10240009Y &E10240010Y; array egdy &E10270001D &E10270002D &E10270003D &E10270004D &E10270005D &E10270006D &E10270007D &E10270008D &E10270009D &E10270010D; array egmo &E10270001M &E10270002M &E10270003M &E10270004M &E10270005M &E10270006M &E10270007M &E10270008M &E10270009M &E10270010M; array egyr &E10270001Y &E10270002Y &E10270003Y &E10270004Y &E10270005Y &E10270006Y &E10270007Y &E10270008Y &E10270009Y &E10270010Y; array bgfl &BGFL_01 &BGFL_02 &BGFL_03 &BGFL_04 &BGFL_05 &BGFL_06 &BGFL_07 &BGFL_08 &BGFL_09 &BGFL_10; array egfl &EGFL_01 &EGFL_02 &EGFL_03 &EGFL_04 &EGFL_05 &EGFL_06 &EGFL_07 &EGFL_08 &EGFL_09 &EGFL_10; *YEMP SELF EMPLOYED (ROS ITEM); array self &R0sel &R0sel &R0sel &R0sel &R0sel &R0sel &R0sel &R0sel &R0sel &R0sel; array UID &R0UID &R0UID &R0UID &R0UID &R0UID &R0UID &R0UID &R0UID &R0UID &R0UID; array milflag &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL &R0MIL; array stary &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY &R0STAY; array starm &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM &R0STAM; array stard &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD &R0STAD; array stopy &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY &R0STOY; array stopm &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM &R0STOM; array stopd &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD &R0STOD; array starw &STARW &STARW &STARW &STARW &STARW &STARW &STARW &STARW &STARW &STARW; array stopw &stopW &stopW &stopW &stopW &stopW &stopW &stopW &stopW &stopW &stopW; array smof &smof &smof &smof &smof &smof &smof &smof &smof &smof &smof; array 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; array _egmdy &_EGMDY_01 &_EGMDY_02 &_EGMDY_03 &_EGMDY_04 &_EGMDY_05 &_EGMDY_06 &_EGMDY_07 &_EGMDY_08 &_EGMDY_09 &_EGMDY_10; array _gdays &_gdays_01 &_gdays_02 &_gdays_03 &_gdays_04 &_gdays_05 &_gdays_06 &_gdays_07 &_gdays_08 &_gdays_09 &_gdays_10; array _bgap &BGAP_01 &BGAP_02 &BGAP_03 &BGAP_04 &BGAP_05 &BGAP_06 &BGAP_07 &BGAP_08 &BGAP_09 &BGAP_10; array _egap &EGAP_01 &EGAP_02 &EGAP_03 &EGAP_04 &EGAP_05 &EGAP_06 &EGAP_07 &EGAP_08 &EGAP_09 &EGAP_10; 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); if _egmdy>0 and _bgmdy>0 then _gdays=_egmdy-_bgmdy+1; if _bgmdy>0 then _bgap=intck('week',begmdy,_bgmdy)+1; if _egmdy>0 then _egap =intck('week',begmdy,_egmdy)+1; if _gdays ne . and _gdays<5 then do; _bgap=.; _egap=.; end; if _egap>_bgap+1 then _bgap=_bgap+1; if _egap>_bgap then _egap=_egap-1; 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; data emp_countweeks; merge two emp_bday emp_int emp_week emp_gaps; by pubid; if r0int>-5; rd0wk=max(dliwk,age14wk); array job1wks (i) _1-_892 w1_893-w1_2117; array job2wks (i) _1-_892 w2_893-w2_2117; array job3wks (i) _1-_892 w3_893-w3_2117; array job4wks (i) _1-_892 w4_893-w4_2117; array job5wks (i) _1-_892 w5_893-w5_2117; array job6wks (i) _1-_892 w6_893-w6_2117; array job7wks (i) _1-_892 w7_893-w7_2117; array job8wks (i) _1-_892 w8_893-w8_2117; array job9wks (i) _1-_892 w9_893-w9_2117; array job10wks (i) _1-_892 w10_893-w10_2117; array job11wks (i) _1-_892 w11_893-w11_2117; array starf starf_1-starf_11; array stopf stopf_1-stopf_11; array starw &starw; array stopw &stopw; array stary &R0STAY; array stopy &R0STOY; array smof &smof; array emof &emof; array bself bself01-bself11; array endwk endwk01-endwk11; array begwk begwk01-begwk11; 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 milflag &R0mil; array jobwks job1wks job2wks job3wks job4wks job5wks job6wks job7wks job8wks job9wks job10wks job11wks; 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; 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; end; if stopw ne . and emof=1 then do; stopf=1; 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 endwk>r0int-1 then endwk=r0int-1; end; end; do over starw; do i=893 to 2117; 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.; 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 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-r0wks20 r0swks97-r0swks99 r0swks00-r0swks20 r0ewks97-r0ewks99 r0ewks00-r0ewks20 wks893-wks2117 swks893-swks2117 ewks893-ewks2117); merge two emp_bday emp_int emp_week emp_countweeks; by pubid; if r0int ne -5; array job1wks (i) _1-_892 w1_893-w1_2117; array job2wks (i) _1-_892 w2_893-w2_2117; array job3wks (i) _1-_892 w3_893-w3_2117; array job4wks (i) _1-_892 w4_893-w4_2117; array job5wks (i) _1-_892 w5_893-w5_2117; array job6wks (i) _1-_892 w6_893-w6_2117; array job7wks (i) _1-_892 w7_893-w7_2117; array job8wks (i) _1-_892 w8_893-w8_2117; array job9wks (i) _1-_892 w9_893-w9_2117; array job10wks (i) _1-_892 w10_893-w10_2117; array job11wks (i) _1-_892 w11_893-w11_2117; array alljobs (i) _1-_892 wks893-wks2117; array selfjobs (i) _1-_892 swks893-swks2117; array empjobs (i) _1-_892 ewks893-ewks2117; array self &R0sel; array jobwks job1wks job2wks job3wks job4wks job5wks job6wks job7wks job8wks job9wks job10wks job11wks; do i=893 to 2117; alljobs=0; selfjobs=0; empjobs=0; end; do over self; do i=893 to 2117; 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- r0wks20; array r0swks r0swks97-r0swks99 r0swks00-r0swks20; array r0ewks r0ewks97-r0ewks99 r0ewks00-r0ewks20; * 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; run; data emp31_jobwks(keep=pubid r0w97_1 -- r0w20_11); merge emp_int emp_countweeks; by pubid; if r0int ne -5; array job1wks (i) _1-_892 w1_893-w1_2117; array job2wks (i) _1-_892 w2_893-w2_2117; array job3wks (i) _1-_892 w3_893-w3_2117; array job4wks (i) _1-_892 w4_893-w4_2117; array job5wks (i) _1-_892 w5_893-w5_2117; array job6wks (i) _1-_892 w6_893-w6_2117; array job7wks (i) _1-_892 w7_893-w7_2117; array job8wks (i) _1-_892 w8_893-w8_2117; array job9wks (i) _1-_892 w9_893-w9_2117; array job10wks (i) _1-_892 w10_893-w10_2117; array job11wks (i) _1-_892 w11_893-w11_2117; array r0wks97 r0w97_1-r0w97_11; array r0wks98 r0w98_1-r0w98_11; array r0wks99 r0w99_1-r0w99_11; array r0wks00 r0w00_1-r0w00_11; array r0wks01 r0w01_1-r0w01_11; array r0wks02 r0w02_1-r0w02_11; array r0wks03 r0w03_1-r0w03_11; array r0wks04 r0w04_1-r0w04_11; array r0wks05 r0w05_1-r0w05_11; array r0wks06 r0w06_1-r0w06_11; array r0wks07 r0w07_1-r0w07_11; array r0wks08 r0w08_1-r0w08_11; array r0wks09 r0w09_1-r0w09_11; array r0wks10 r0w10_1-r0w10_11; array r0wks11 r0w11_1-r0w11_11; array r0wks12 r0w12_1-r0w12_11; array r0wks13 r0w13_1-r0w13_11; array r0wks14 r0w14_1-r0w14_11; array r0wks15 r0w15_1-r0w15_11; array r0wks16 r0w16_1-r0w16_11; array r0wks17 r0w17_1-r0w17_11; array r0wks18 r0w18_1-r0w18_11; array r0wks19 r0w19_1-r0w19_11; array r0wks20 r0w20_1-r0w20_11; array jobwks job1wks job2wks job3wks job4wks job5wks job6wks job7wks job8wks job9wks job10wks job11wks; %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; do k=1 to 11; 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; do k=1 to 11; 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; if back>1 then bhours=-3; array br (k) bstar01--bstar11; do k=1 to 11; 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._11; array ah&yr (k) ah&yr._1- ah&yr._11; array sah&yr (k) sah&yr._1-sah&yr._11; array eah&yr (k) eah&yr._1-eah&yr._11; do k=1 to 11; 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 11; 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 11; 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 data emp34_wksage14; merge emp_bday emp_int emp_week emp_countweeks emp29_numwks; by pubid; if r0int ne -5; array alljobs (i) _1-_892 wks893-wks2117; array empjobs (i) _1-_892 ewks893-ewks2117; 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-hours11); by pubid; if r0int ne -5; array job1wks (i) _1-_892 w1_893-w1_2117; array job2wks (i) _1-_892 w2_893-w2_2117; array job3wks (i) _1-_892 w3_893-w3_2117; array job4wks (i) _1-_892 w4_893-w4_2117; array job5wks (i) _1-_892 w5_893-w5_2117; array job6wks (i) _1-_892 w6_893-w6_2117; array job7wks (i) _1-_892 w7_893-w7_2117; array job8wks (i) _1-_892 w8_893-w8_2117; array job9wks (i) _1-_892 w9_893-w9_2117; array job10wks (i) _1-_892 w10_893-w10_2117; array job11wks (i) _1-_892 w11_893-w11_2117; array hours hours01-hours11; array self &R0sel; array wks14 wks1401-wks1411; array hrs14 hrs1401-hrs1411; array ehrs14 ehrs1401-ehrs1411; array wks20 wks2001-wks2011; array hrs20 hrs2001-hrs2011; array ehrs20 ehrs2001-ehrs2011; array jobwks job1wks job2wks job3wks job4wks job5wks job6wks job7wks job8wks job9wks job10wks job11wks; end14wk=min(age20wk-1, r0int-1); 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; 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 r19.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_2117; array job2wks (i) _1-_892 w2_893-w2_2117; array job3wks (i) _1-_892 w3_893-w3_2117; array job4wks (i) _1-_892 w4_893-w4_2117; array job5wks (i) _1-_892 w5_893-w5_2117; array job6wks (i) _1-_892 w6_893-w6_2117; array job7wks (i) _1-_892 w7_893-w7_2117; array job8wks (i) _1-_892 w8_893-w8_2117; array job9wks (i) _1-_892 w9_893-w9_2117; array job10wks (i) _1-_892 w10_893-w10_2117; array job11wks (i) _1-_892 w11_893-w11_2117; 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_39 _2023-_2117; 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_35 _2019-_2117; 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_28 _2012-_2117; 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_16 _2000-_2008 EMP_DUAL_4_2018_26-EMP_DUAL_4_2018_28 _2012-_2117; 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_10 _1994-_2117; 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_09 _1993-_2117; 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-_2117; 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-_2117; array self &r0sel; array uid &r0uid; array jobwks job1wks job2wks job3wks job4wks job5wks job6wks job7wks job8wks job9wks job10wks job11wks; %macro emp36; array r0j&yr r0j&yr.01 -r0j&yr.11; array r0d&yr r0d&yr.01 -r0d&yr.11; array r0s&yr r0s&yr.01 -r0s&yr.11; array r0e&yr r0e&yr.01 -r0e&yr.11; 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 r0job&yr ge 0 and r0j&yr.11>9700 and r0j&yr.11 ne r0d&yr.11 then r0job&yr =r0job&yr +1; if r0j&yr.11=-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 r0emp&yr ge 0 and r0e&yr.11>9700 and r0e&yr.11 ne r0d&yr.11 then r0emp&yr =r0emp&yr +1; if r0e&yr.11=-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; if r0self&yr ge 0 and r0s&yr.11>9700 and r0s&yr.11 ne r0d&yr.11 then r0self&yr =r0self&yr +1; if r0s&yr.11=-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 2117; %emp36 data emp37_numjobs14; merge two emp_bday emp_int emp_week emp_countweeks r19.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_2117; array job2wks (i) _1-_892 w2_893-w2_2117; array job3wks (i) _1-_892 w3_893-w3_2117; array job4wks (i) _1-_892 w4_893-w4_2117; array job5wks (i) _1-_892 w5_893-w5_2117; array job6wks (i) _1-_892 w6_893-w6_2117; array job7wks (i) _1-_892 w7_893-w7_2117; array job8wks (i) _1-_892 w8_893-w8_2117; array job9wks (i) _1-_892 w9_893-w9_2117; array job10wks (i) _1-_892 w10_893-w10_2117; array job11wks (i) _1-_892 w11_893-w11_2117; 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_39 _2023-_2117; 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_35 _2019-_2117; 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_28 _2012-_2117; 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_16 _2000-_2008 EMP_DUAL_4_2018_26-EMP_DUAL_4_2018_28 _2012-_2117; 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_10 _1994-_2117; 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_09 _1993-_2117; 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-_2117; 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-_2117; *************************************************************************** ** Indicate if worked at least one week on a NEW job since age 14 & 20 ** ***************************************************************************; array r0e14 r0e1401-r0e1411; array r0j14 r0j1401-r0j1411; array r0d14 r0d1401-r0d1411; array r0e20 r0e2001-r0e2011; array r0j20 r0j2001-r0j2011; array r0d20 r0d2001-r0d2011; array self &R0sel; array uid &r0uid; array jobwks job1wks job2wks job3wks job4wks job5wks job6wks job7wks job8wks job9wks job10wks job11wks; 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 r0empage14 ge 0 and r0e1411>9700 and r0e1411 ne r0d1411 then r0empage14 =r0empage14 +1; if r0e1411=-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 r0jobage20 ge 0 and r0j2011>9700 and r0j2011 ne r0d2011 then r0jobage20 =r0jobage20 +1; if r0j2011=-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; if r0empage20 ge 0 and r0e2011>9700 and r0e2011 ne r0d2011 then r0empage20 =r0empage20 +1; if r0e2011=-3 then r0empage20 =-3; data emp_array; merge two emp_bday (keep=pubid age14wk) emp_int(keep=pubid r0int) emp33_anhours (keep=pubid hours01-hours11) emp_week emp_gaps emp_countweeks(keep=pubid rd0wk starf_1-starf_11 stopf_1-stopf_11 begwk01-begwk11 endwk01-endwk11); by pubid; if r0int>-5; array job1wks (i) _1-_892 wk1_893-wk1_2117; array hourwk1 (i) _1-_892 hr1_893-hr1_2117; array job2wks (i) _1-_892 wk2_893-wk2_2117; array hourwk2 (i) _1-_892 hr2_893-hr2_2117; array job3wks (i) _1-_892 wk3_893-wk3_2117; array hourwk3 (i) _1-_892 hr3_893-hr3_2117; array job4wks (i) _1-_892 wk4_893-wk4_2117; array hourwk4 (i) _1-_892 hr4_893-hr4_2117; array job5wks (i) _1-_892 wk5_893-wk5_2117; array hourwk5 (i) _1-_892 hr5_893-hr5_2117; array job6wks (i) _1-_892 wk6_893-wk6_2117; array hourwk6 (i) _1-_892 hr6_893-hr6_2117; array job7wks (i) _1-_892 wk7_893-wk7_2117; array hourwk7 (i) _1-_892 hr7_893-hr7_2117; array job8wks (i) _1-_892 wk8_893-wk8_2117; array hourwk8 (i) _1-_892 hr8_893-hr8_2117; array job9wks (i) _1-_892 wk9_893-wk9_2117; array hourwk9 (i) _1-_892 hr9_893-hr9_2117; array job10wks (i) _1-_892 wk10_893-wk10_2117; array hourwk10 (i) _1-_892 hr10_893-hr10_2117; array job11wks (i) _1-_892 wk11_893-wk11_2117; array hourwk11 (i) _1-_892 hr11_893-hr11_2117; * Default Settings; do i=893 to 2117; job1wks=0; job2wks=0; job3wks=0; job4wks=0; job5wks=0; job6wks=0; job7wks=0; job8wks=0; job9wks=0; job10wks=0; job11wks=0; hourwk1=0; hourwk2=0; hourwk3=0; hourwk4=0; hourwk5=0; hourwk6=0; hourwk7=0; hourwk8=0; hourwk9=0; hourwk10=0; hourwk11=0; end; *********************************** **start and stop dates: all jobs ** ***********************************; array starw starw01-starw11; array stopw stopw01-stopw11; array starf starf_1-starf_11; array stopf stopf_1-stopf_11; array uid &R0uid; array staryrf staryrf01-staryrf11; array stopyrf stopyrf01-stopyrf11; array smof smof01-smof11; array emof emof01-emof11; array stary stary01-stary11; array stopy stopy01-stopy11; array begwk begwk01-begwk11; array endwk endwk01-endwk11; array r0mil &R0mil; array hours hours01-hours11; array jobwks job1wks job2wks job3wks job4wks job5wks job6wks job7wks job8wks job9wks job10wks job11wks; array hourwk hourwk1 hourwk2 hourwk3 hourwk4 hourwk5 hourwk6 hourwk7 hourwk8 hourwk9 hourwk10 hourwk11; do over starw; if starw=-3 and uid ne -5 then do; starw=rd0wk; staryrf=1; end; if stopw=-3 and uid ne -5 then do; stopw=r0int-1; stopyrf=1; end; *********************************** *** 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 2117; 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-starw11 stopw01-stopw11 bgap01_01-bgap01_10 egap01_01-egap01_10 bgap02_01-bgap02_05 egap02_01-egap02_05 bgap03_01-bgap03_03 egap03_01-egap03_03 bgap04_01-bgap04_03 egap04_01-egap04_03 bgap05_01 egap05_01 bgap06_01 egap06_01 bgap07_01 egap07_01 bgap10_01-bgap10_02 egap10_01-egap10_02; array wkinyr stawk01-stawk11 stowk01-stowk11 b1gawk1-b1gawk10 e1gawk1-e1gawk10 b2gawk1-b2gawk5 e2gawk1-e2gawk5 b3gawk1-b3gawk3 e3gawk1-e3gawk3 b4gawk1-b4gawk3 e4gawk1-e4gawk3 b5gawk1 e5gawk1 b6gawk1 e6gawk1 b7gawk1 e7gawk1 b10gawk1-b10gawk2 e10gawk1-e10gawk2; array yr stayr01-stayr11 stoyr01-stoyr11 b1gayr1-b1gayr10 e1gayr1-e1gayr10 b2gayr1-b2gayr5 e2gayr1-e2gayr5 b3gayr1-b3gayr3 e3gayr1-e3gayr3 b4gayr1-b4gayr3 e4gayr1-e4gayr3 b5gayr1 e5gayr1 b6gayr1 e6gayr1 b7gayr1 e7gayr1 b10gayr1-b10gayr2 e10gayr1-e10gayr2; 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 2117 then do; yr=2020; wkinyr=accwk-2087; end; end; array stawk stawk01-stawk11; array stowk stowk01-stowk11; array stayr stayr01-stayr11; array stoyr stoyr01-stoyr11; 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; 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 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 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 E10371 &E10370001; array E10372 &E10370002; array E10373 &E10370003; array E10374 &E10370004; array E10375 &E10370005; array E10376 &E10370006; array E10377 &E10370007; array E10541 &E10540001; array E10542 &E10540002; *array E10543 &E10540003; array blook1 blook1_1 blook2_1 blook3_1 blook4_1 blook5_1 blook6_1 blook7_1 E08-E09 blook10_1 E11; array blook2 blook1_2 blook2_2 blook3_2 blook4_2 E05 E06 E07 E08-E09 blook10_2 E11; array blook3 blook1_3 blook2_3 blook3_3 blook4_3 E05 E06 E07 E08-E11; array blook4 blook1_4 blook2_4 E03 E04 E05 E06 E07 E08-E11; array blook5 blook1_5 blook2_5 E03 E04 E05 E06 E07 E08-E11; array blook6 blook1_6 E02 E03 E04 E05 E06 E07 E08-E11; array blook7 blook1_7 E02 E03 E04 E05 E06 E07 E08-E11; array blook8 blook1_8 E02 E03 E04 E05 E06 E07 E08-E11; array blook9 blook1_9 E02 E03 E04 E05 E06 E07 E08-E11; array blook10 blook1_10 E02 E03 E04 E05 E06 E07 E08-E11; array elook1 elook1_1 elook2_1 elook3_1 elook4_1 elook5_1 elook6_1 elook7_1 E08-E09 elook10_1 E11; array elook2 elook1_2 elook2_2 elook3_2 elook4_2 E05 E06 E07 E08-E09 elook10_2 E11; array elook3 elook1_3 elook2_3 elook3_3 elook4_3 E05 E06 E07 E08-E11; array elook4 elook1_4 elook2_4 E03 E04 E05 E06 E07 E08-E11; array elook5 elook1_5 elook2_5 E03 E04 E05 E06 E07 E08-E11; array elook6 elook1_6 E02 E03 E04 E05 E06 E07 E08-E11; array elook7 elook1_7 E02 E03 E04 E05 E06 E07 E08-E11; array elook8 elook1_8 E02 E03 E04 E05 E06 E07 E08-E11; array elook9 elook1_9 E02 E03 E04 E05 E06 E07 E08-E11; array elook10 elook1_10 E02 E03 E04 E05 E06 E07 E08-E11; array E1059381 &E10593801; 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 E105951 &E10595001; *array E105952 &E10595002; %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 ***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-wks2117; array dual2 (i) _1-_892 dl2_893-dl2_2117; array dual3 (i) _1-_892 dl3_893-dl3_2117; array dual4 (i) _1-_892 dl4_893-dl4_2117; array dual5 (i) _1-_892 dl5_893-dl5_2117; array dual6 (i) _1-_892 dl6_893-dl6_2117; array dual7 (i) _1-_892 dl7_893-dl7_2117; array dual8 (i) _1-_892 dl8_893-dl8_2117; 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; if hourwk11 in (-6,-3,-2,-1) then allhrs=-3; if hourwk11>0 and allhrs>-3 then allhrs=allhrs+hourwk11; if hourwk11>0 and allhrs=-4 then allhrs=hourwk11; end; ** Convert all codes after the current interview week to -5; do i=r0int to 2117; 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-wks2117); by pubid; if r0int>-5; array alljobs (*) _1-_892 wks893-wks2117; * weekly job status array; array aftjobs (*) _1-_892 wks894-wks2118; * weekly job status array, forward one week; array E119000 (11) &E119000; *CHK TTL # WKS BJGAP 2011; array E119200 (11) &E119200; *# WKS LOOKING WRK/LYFF S-EMP BJOB GAP 2011; array gp_lthC (11) gp_lthC1-gp_lthC11; * CAPI - btw job gap length; array sr_lthC (11) sr_lthC1-sr_lthC11; * CAPI - btw job search length; array gp_lth (11) gp_lth1-gp_lth11; * EVENT - btw job gap length; array sr_lth (11) sr_lth1-sr_lth11; * EVENT - btw job search length; array gapb (11) gapb1-gapb11; * start week of a gap; array gape (11) gape1-gape11; * stop week of a gap; array olf_lth (11) olf_lth1-olf_lth11; * period of btw job gap out of labor force; array halfolf (11) halfolf1-halfolf11; * half of olf_lth; array unempb (11) unempb1-unempb11; * start week of unemployment period (search) in btw job gap; array unempe (11) unempe1-unempe11; * stop week of unemployment period (search) in btw job gap; do j=1 to 11; 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; bjlast=max(gapb1,gapb2,gapb3,gapb4,gapb5,gapb6,gapb7,gapb8,gapb9,gapb10,gapb11); 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; 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; 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; do j=1 to dim(gapb); if gapb(j)>0 and gape(j)>0 and (gape(j)>=gapb(j)) then do; do i=gapb(j) to gape(j); alljobs(i)=5; end; 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; 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; if unempe(j)>=unempb(j)>0 then do; do i=unempb(j) to unempe(j); alljobs(i)=4; end; end; end; end; do i=(r0int) to (2117); alljobs(i)=-5; end; do i=893 to (rd0wk-1); alljobs(i)=-4; end; do i=893 to 2117; if alljobs(i)=0 then alljobs(i)=2; end; do i=893 to 2117; if alljobs(i)=-3 then alljobs(i)=0; end; run;