Core Employment Variables, Linking to Past Rounds SAS Code for Variable Creation CALL SYMPUT ('R1COM ','CV_HRLY_COMPENSATION_1997_01-CV_HRLY_COMPENSATION_1997_07 E08-E15'); CALL SYMPUT ('R1PAY ','CV_HRLY_PAY_1997_01-CV_HRLY_PAY_1997_07 E08-E15'); CALL SYMPUT ('R1STAD ','YEMP_STARTDATE_1997_D_01-YEMP_STARTDATE_1997_D_07 E08-E15'); CALL SYMPUT ('R1STAM ','YEMP_STARTDATE_1997_M_01-YEMP_STARTDATE_1997_M_07 E08-E15'); CALL SYMPUT ('R1STAY ','YEMP_STARTDATE_1997_Y_01-YEMP_STARTDATE_1997_Y_07 E08-E15'); CALL SYMPUT ('R1STOD ','YEMP_STOPDATE_1997_D_01-YEMP_STOPDATE_1997_D_07 E08-E15'); CALL SYMPUT ('R1STOM ','YEMP_STOPDATE_1997_M_01-YEMP_STOPDATE_1997_M_07 E08-E15'); CALL SYMPUT ('R1STOY ','YEMP_STOPDATE_1997_Y_01-YEMP_STOPDATE_1997_Y_07 E08-E15'); CALL SYMPUT ('R1TEN ','CV_WKSWK_JOB_DLI_1997_01-CV_WKSWK_JOB_DLI_1997_07 E08-E15'); CALL SYMPUT ('R1UID ','YEMP_UID_1997_01-YEMP_UID_1997_07 E08-E15'); CALL SYMPUT ('R2COM ','CV_HRLY_COMPENSATION_1998_01-CV_HRLY_COMPENSATION_1998_09 E10-E15'); CALL SYMPUT ('R2MIL ','YEMP_MILFLAG_1998_01-YEMP_MILFLAG_1998_09 E10-E15'); CALL SYMPUT ('R2PAY ','CV_HRLY_PAY_1998_01-CV_HRLY_PAY_1998_09 E10-E15'); CALL SYMPUT ('R2STAD ','YEMP_STARTDATE_1998_D_01-YEMP_STARTDATE_1998_D_09 E10-E15'); CALL SYMPUT ('R2STAM ','YEMP_STARTDATE_1998_M_01-YEMP_STARTDATE_1998_M_09 E10-E15'); CALL SYMPUT ('R2STAY ','YEMP_STARTDATE_1998_Y_01-YEMP_STARTDATE_1998_Y_09 E10-E15'); CALL SYMPUT ('R2STOD ','YEMP_STOPDATE_1998_D_01-YEMP_STOPDATE_1998_D_09 E10-E15'); CALL SYMPUT ('R2STOM ','YEMP_STOPDATE_1998_M_01-YEMP_STOPDATE_1998_M_09 E10-E15'); CALL SYMPUT ('R2STOY ','YEMP_STOPDATE_1998_Y_01-YEMP_STOPDATE_1998_Y_09 E10-E15'); CALL SYMPUT ('R2TEN ','CV_WKSWK_JOB_DLI_1998_01-CV_WKSWK_JOB_DLI_1998_09 E10-E15'); CALL SYMPUT ('R2UID ','YEMP_UID_1998_01-YEMP_UID_1998_09 E10-E15'); CALL SYMPUT ('R3COM ','CV_HRLY_COMPENSATION_1999_01-CV_HRLY_COMPENSATION_1999_09 E10-E15'); CALL SYMPUT ('R3MIL ','YEMP_MILFLAG_1999_01-YEMP_MILFLAG_1999_09 E10-E15'); CALL SYMPUT ('R3PAY ','CV_HRLY_PAY_1999_01-CV_HRLY_PAY_1999_09 E10-E15'); CALL SYMPUT ('R3STAD ','YEMP_STARTDATE_1999_D_01-YEMP_STARTDATE_1999_D_09 E10-E15'); CALL SYMPUT ('R3STAM ','YEMP_STARTDATE_1999_M_01-YEMP_STARTDATE_1999_M_09 E10-E15'); CALL SYMPUT ('R3STAY ','YEMP_STARTDATE_1999_Y_01-YEMP_STARTDATE_1999_Y_09 E10-E15'); CALL SYMPUT ('R3STOD ','YEMP_STOPDATE_1999_D_01-YEMP_STOPDATE_1999_D_09 E10-E15'); CALL SYMPUT ('R3STOM ','YEMP_STOPDATE_1999_M_01-YEMP_STOPDATE_1999_M_09 E10-E15'); CALL SYMPUT ('R3STOY ','YEMP_STOPDATE_1999_Y_01-YEMP_STOPDATE_1999_Y_09 E10-E15'); CALL SYMPUT ('R3TEN ','CV_WKSWK_JOB_DLI_1999_01-CV_WKSWK_JOB_DLI_1999_09 E10-E15'); CALL SYMPUT ('R3UID ','YEMP_UID_1999_01-YEMP_UID_1999_09 E10-E15'); CALL SYMPUT ('R4COM ','CV_HRLY_COMPENSATION_2000_01-CV_HRLY_COMPENSATION_2000_09 E10-E15'); CALL SYMPUT ('R4MIL ','YEMP_MILFLAG_2000_01-YEMP_MILFLAG_2000_09 E10-E15'); CALL SYMPUT ('R4PAY ','CV_HRLY_PAY_2000_01-CV_HRLY_PAY_2000_09 E10-E15'); CALL SYMPUT ('R4SEL ','YEMP_SELFEMP_2000_01-YEMP_SELFEMP_2000_09 E10-E15'); CALL SYMPUT ('R4STAD ','YEMP_STARTDATE_2000_D_01-YEMP_STARTDATE_2000_D_09 E10-E15'); CALL SYMPUT ('R4STAM ','YEMP_STARTDATE_2000_M_01-YEMP_STARTDATE_2000_M_09 E10-E15'); CALL SYMPUT ('R4STAY ','YEMP_STARTDATE_2000_Y_01-YEMP_STARTDATE_2000_Y_09 E10-E15'); CALL SYMPUT ('R4STOD ','YEMP_STOPDATE_2000_D_01-YEMP_STOPDATE_2000_D_09 E10-E15'); CALL SYMPUT ('R4STOM ','YEMP_STOPDATE_2000_M_01-YEMP_STOPDATE_2000_M_09 E10-E15'); CALL SYMPUT ('R4STOY ','YEMP_STOPDATE_2000_Y_01-YEMP_STOPDATE_2000_Y_09 E10-E15'); CALL SYMPUT ('R4TEN ','CV_WKSWK_JOB_DLI_2000_01-CV_WKSWK_JOB_DLI_2000_09 E10-E15'); CALL SYMPUT ('R4UID ','YEMP_UID_2000_01-YEMP_UID_2000_09 E10-E15'); CALL SYMPUT ('R5COM ','CV_HRLY_COMPENSATION_2001_01-CV_HRLY_COMPENSATION_2001_08 E09-E15'); CALL SYMPUT ('R5MIL ','YEMP_MILFLAG_2001_01-YEMP_MILFLAG_2001_08 E09-E15'); CALL SYMPUT ('R5PAY ','CV_HRLY_PAY_2001_01-CV_HRLY_PAY_2001_08 E09-E15'); CALL SYMPUT ('R5SEL ','YEMP_SELFEMP_2001_01-YEMP_SELFEMP_2001_08 E09-E15'); CALL SYMPUT ('R5STAD ','YEMP_STARTDATE_2001_D_01-YEMP_STARTDATE_2001_D_08 E09-E15'); CALL SYMPUT ('R5STAM ','YEMP_STARTDATE_2001_M_01-YEMP_STARTDATE_2001_M_08 E09-E15'); CALL SYMPUT ('R5STAY ','YEMP_STARTDATE_2001_Y_01-YEMP_STARTDATE_2001_Y_08 E09-E15'); CALL SYMPUT ('R5STOD ','YEMP_STOPDATE_2001_D_01-YEMP_STOPDATE_2001_D_08 E09-E15'); CALL SYMPUT ('R5STOM ','YEMP_STOPDATE_2001_M_01-YEMP_STOPDATE_2001_M_08 E09-E15'); CALL SYMPUT ('R5STOY ','YEMP_STOPDATE_2001_Y_01-YEMP_STOPDATE_2001_Y_08 E09-E15'); CALL SYMPUT ('R5TEN ','CV_WKSWK_JOB_DLI_2001_01-CV_WKSWK_JOB_DLI_2001_08 E09-E15'); CALL SYMPUT ('R5UID ','YEMP_UID_2001_01-YEMP_UID_2001_08 E09-E15'); CALL SYMPUT ('R6COM ','CV_HRLY_COMPENSATION_2002_01-CV_HRLY_COMPENSATION_2002_11 E12-E15'); CALL SYMPUT ('R6MIL ','YEMP_MILFLAG_2002_01-YEMP_MILFLAG_2002_11 E12-E15'); CALL SYMPUT ('R6PAY ','CV_HRLY_PAY_2002_01-CV_HRLY_PAY_2002_11 E12-E15'); CALL SYMPUT ('R6SEL ','YEMP_SELFEMP_2002_01-YEMP_SELFEMP_2002_11 E12-E15'); CALL SYMPUT ('R6STAD ','YEMP_STARTDATE_2002_D_01-YEMP_STARTDATE_2002_D_11 E12-E15'); CALL SYMPUT ('R6STAM ','YEMP_STARTDATE_2002_M_01-YEMP_STARTDATE_2002_M_11 E12-E15'); CALL SYMPUT ('R6STAY ','YEMP_STARTDATE_2002_Y_01-YEMP_STARTDATE_2002_Y_11 E12-E15'); CALL SYMPUT ('R6STOD ','YEMP_STOPDATE_2002_D_01-YEMP_STOPDATE_2002_D_11 E12-E15'); CALL SYMPUT ('R6STOM ','YEMP_STOPDATE_2002_M_01-YEMP_STOPDATE_2002_M_11 E12-E15'); CALL SYMPUT ('R6STOY ','YEMP_STOPDATE_2002_Y_01-YEMP_STOPDATE_2002_Y_11 E12-E15'); CALL SYMPUT ('R6TEN ','CV_WKSWK_JOB_DLI_2002_01-CV_WKSWK_JOB_DLI_2002_11 E12-E15'); CALL SYMPUT ('R6UID ','YEMP_UID_2002_01-YEMP_UID_2002_11 E12-E15'); CALL SYMPUT ('R7COM ','CV_HRLY_COMPENSATION_2003_01-CV_HRLY_COMPENSATION_2003_10 E11-E15'); CALL SYMPUT ('R7MIL ','YEMP_MILFLAG_2003_01-YEMP_MILFLAG_2003_10 E11-E15'); CALL SYMPUT ('R7PAY ','CV_HRLY_PAY_2003_01-CV_HRLY_PAY_2003_10 E11-E15'); CALL SYMPUT ('R7SEL ','YEMP_SELFEMP_2003_01-YEMP_SELFEMP_2003_10 E11-E15'); CALL SYMPUT ('R7STAD ','YEMP_STARTDATE_2003_D_01-YEMP_STARTDATE_2003_D_10 E11-E15'); CALL SYMPUT ('R7STAM ','YEMP_STARTDATE_2003_M_01-YEMP_STARTDATE_2003_M_10 E11-E15'); CALL SYMPUT ('R7STAY ','YEMP_STARTDATE_2003_Y_01-YEMP_STARTDATE_2003_Y_10 E11-E15'); CALL SYMPUT ('R7STOD ','YEMP_STOPDATE_2003_D_01-YEMP_STOPDATE_2003_D_10 E11-E15'); CALL SYMPUT ('R7STOM ','YEMP_STOPDATE_2003_M_01-YEMP_STOPDATE_2003_M_10 E11-E15'); CALL SYMPUT ('R7STOY ','YEMP_STOPDATE_2003_Y_01-YEMP_STOPDATE_2003_Y_10 E11-E15'); CALL SYMPUT ('R7TEN ','CV_WKSWK_JOB_DLI_2003_01-CV_WKSWK_JOB_DLI_2003_10 E11-E15'); CALL SYMPUT ('R7UID ','YEMP_UID_2003_01-YEMP_UID_2003_10 E11-E15'); CALL SYMPUT ('R8COM ','CV_HRLY_COMPENSATION_2004_01-CV_HRLY_COMPENSATION_2004_07 E08-E15'); CALL SYMPUT ('R8MIL ','YEMP_MILFLAG_2004_01-YEMP_MILFLAG_2004_07 E08-E15'); CALL SYMPUT ('R8PAY ','CV_HRLY_PAY_2004_01-CV_HRLY_PAY_2004_07 E08-E15'); CALL SYMPUT ('R8SEL ','YEMP_SELFEMP_2004_01-YEMP_SELFEMP_2004_07 E08-E15'); CALL SYMPUT ('R8STAD ','YEMP_STARTDATE_2004_D_01-YEMP_STARTDATE_2004_D_07 E08-E15'); CALL SYMPUT ('R8STAM ','YEMP_STARTDATE_2004_M_01-YEMP_STARTDATE_2004_M_07 E08-E15'); CALL SYMPUT ('R8STAY ','YEMP_STARTDATE_2004_Y_01-YEMP_STARTDATE_2004_Y_07 E08-E15'); CALL SYMPUT ('R8STOD ','YEMP_STOPDATE_2004_D_01-YEMP_STOPDATE_2004_D_07 E08-E15'); CALL SYMPUT ('R8STOM ','YEMP_STOPDATE_2004_M_01-YEMP_STOPDATE_2004_M_07 E08-E15'); CALL SYMPUT ('R8STOY ','YEMP_STOPDATE_2004_Y_01-YEMP_STOPDATE_2004_Y_07 E08-E15'); CALL SYMPUT ('R8TEN ','CV_WKSWK_JOB_DLI_2004_01-CV_WKSWK_JOB_DLI_2004_07 E08-E15'); CALL SYMPUT ('R8UID ','YEMP_UID_2004_01-YEMP_UID_2004_07 E08-E15'); CALL SYMPUT ('R9COM ','CV_HRLY_COMPENSATION_2005_01-CV_HRLY_COMPENSATION_2005_09 E10-E15'); CALL SYMPUT ('R9MIL ','YEMP_MILFLAG_2005_01-YEMP_MILFLAG_2005_09 E10-E15'); CALL SYMPUT ('R9PAY ','CV_HRLY_PAY_2005_01-CV_HRLY_PAY_2005_09 E10-E15'); CALL SYMPUT ('R9SEL ','YEMP_SELFEMP_2005_01-YEMP_SELFEMP_2005_09 E10-E15'); CALL SYMPUT ('R9STAD ','YEMP_STARTDATE_2005_D_01-YEMP_STARTDATE_2005_D_09 E10-E15'); CALL SYMPUT ('R9STAM ','YEMP_STARTDATE_2005_M_01-YEMP_STARTDATE_2005_M_09 E10-E15'); CALL SYMPUT ('R9STAY ','YEMP_STARTDATE_2005_Y_01-YEMP_STARTDATE_2005_Y_09 E10-E15'); CALL SYMPUT ('R9STOD ','YEMP_STOPDATE_2005_D_01-YEMP_STOPDATE_2005_D_09 E10-E15'); CALL SYMPUT ('R9STOM ','YEMP_STOPDATE_2005_M_01-YEMP_STOPDATE_2005_M_09 E10-E15'); CALL SYMPUT ('R9STOY ','YEMP_STOPDATE_2005_Y_01-YEMP_STOPDATE_2005_Y_09 E10-E15'); CALL SYMPUT ('R9TEN ','CV_WKSWK_JOB_DLI_2005_01-CV_WKSWK_JOB_DLI_2005_09 E10-E15'); CALL SYMPUT ('R9UID ','YEMP_UID_2005_01-YEMP_UID_2005_09 E10-E15'); CALL SYMPUT ('R10COM ','CV_HRLY_COMPENSATION_2006_01-CV_HRLY_COMPENSATION_2006_09 E10-E15'); CALL SYMPUT ('R10MIL ','YEMP_MILFLAG_2006_01-YEMP_MILFLAG_2006_09 E10-E15'); CALL SYMPUT ('R10PAY ','CV_HRLY_PAY_2006_01-CV_HRLY_PAY_2006_09 E10-E15'); CALL SYMPUT ('R10SEL ','YEMP_SELFEMP_2006_01-YEMP_SELFEMP_2006_09 E10-E15'); CALL SYMPUT ('R10STAD ','YEMP_STARTDATE_2006_D_01-YEMP_STARTDATE_2006_D_09 E10-E15'); CALL SYMPUT ('R10STAM ','YEMP_STARTDATE_2006_M_01-YEMP_STARTDATE_2006_M_09 E10-E15'); CALL SYMPUT ('R10STAY ','YEMP_STARTDATE_2006_Y_01-YEMP_STARTDATE_2006_Y_09 E10-E15'); CALL SYMPUT ('R10STOD ','YEMP_STOPDATE_2006_D_01-YEMP_STOPDATE_2006_D_09 E10-E15'); CALL SYMPUT ('R10STOM ','YEMP_STOPDATE_2006_M_01-YEMP_STOPDATE_2006_M_09 E10-E15'); CALL SYMPUT ('R10STOY ','YEMP_STOPDATE_2006_Y_01-YEMP_STOPDATE_2006_Y_09 E10-E15'); CALL SYMPUT ('R10TEN ','CV_WKSWK_JOB_DLI_2006_01-CV_WKSWK_JOB_DLI_2006_09 E10-E15'); CALL SYMPUT ('R10UID ','YEMP_UID_2006_01-YEMP_UID_2006_09 E10-E15'); CALL SYMPUT ('R11COM ','CV_HRLY_COMPENSATION_2007_01-CV_HRLY_COMPENSATION_2007_08 E09-E15'); CALL SYMPUT ('R11MIL ','YEMP_MILFLAG_2007_01-YEMP_MILFLAG_2007_08 E09-E15'); CALL SYMPUT ('R11PAY ','CV_HRLY_PAY_2007_01-CV_HRLY_PAY_2007_08 E09-E15'); CALL SYMPUT ('R11SEL ','YEMP_SELFEMP_2007_01-YEMP_SELFEMP_2007_08 E09-E15'); CALL SYMPUT ('R11STAD ','YEMP_STARTDATE_2007_D_01-YEMP_STARTDATE_2007_D_08 E09-E15'); CALL SYMPUT ('R11STAM ','YEMP_STARTDATE_2007_M_01-YEMP_STARTDATE_2007_M_08 E09-E15'); CALL SYMPUT ('R11STAY ','YEMP_STARTDATE_2007_Y_01-YEMP_STARTDATE_2007_Y_08 E09-E15'); CALL SYMPUT ('R11STOD ','YEMP_STOPDATE_2007_D_01-YEMP_STOPDATE_2007_D_08 E09-E15'); CALL SYMPUT ('R11STOM ','YEMP_STOPDATE_2007_M_01-YEMP_STOPDATE_2007_M_08 E09-E15'); CALL SYMPUT ('R11STOY ','YEMP_STOPDATE_2007_Y_01-YEMP_STOPDATE_2007_Y_08 E09-E15'); CALL SYMPUT ('R11TEN ','CV_WKSWK_JOB_DLI_2007_01-CV_WKSWK_JOB_DLI_2007_08 E09-E15'); CALL SYMPUT ('R11UID ','YEMP_UID_2007_01-YEMP_UID_2007_08 E09-E15'); CALL SYMPUT ('R12COM ','CV_HRLY_COMPENSATION_2008_01-CV_HRLY_COMPENSATION_2008_08 E09-E15'); CALL SYMPUT ('R12MIL ','YEMP_MILFLAG_2008_01-YEMP_MILFLAG_2008_08 E09-E15'); CALL SYMPUT ('R12PAY ','CV_HRLY_PAY_2008_01-CV_HRLY_PAY_2008_08 E09-E15'); CALL SYMPUT ('R12SEL ','YEMP_SELFEMP_2008_01-YEMP_SELFEMP_2008_08 E09-E15'); CALL SYMPUT ('R12STAD ','YEMP_STARTDATE_2008_D_01-YEMP_STARTDATE_2008_D_08 E09-E15'); CALL SYMPUT ('R12STAM ','YEMP_STARTDATE_2008_M_01-YEMP_STARTDATE_2008_M_08 E09-E15'); CALL SYMPUT ('R12STAY ','YEMP_STARTDATE_2008_Y_01-YEMP_STARTDATE_2008_Y_08 E09-E15'); CALL SYMPUT ('R12STOD ','YEMP_STOPDATE_2008_D_01-YEMP_STOPDATE_2008_D_08 E09-E15'); CALL SYMPUT ('R12STOM ','YEMP_STOPDATE_2008_M_01-YEMP_STOPDATE_2008_M_08 E09-E15'); CALL SYMPUT ('R12STOY ','YEMP_STOPDATE_2008_Y_01-YEMP_STOPDATE_2008_Y_08 E09-E15'); CALL SYMPUT ('R12TEN ','CV_WKSWK_JOB_DLI_2008_01-CV_WKSWK_JOB_DLI_2008_08 E09-E15'); CALL SYMPUT ('R12UID ','YEMP_UID_2008_01-YEMP_UID_2008_08 E09-E15'); CALL SYMPUT ('R13COM ','CV_HRLY_COMPENSATION_2009_01-CV_HRLY_COMPENSATION_2009_09 E10-E15'); CALL SYMPUT ('R13MIL ','YEMP_MILFLAG_2009_01-YEMP_MILFLAG_2009_09 E10-E15'); CALL SYMPUT ('R13PAY ','CV_HRLY_PAY_2009_01-CV_HRLY_PAY_2009_09 E10-E15'); CALL SYMPUT ('R13SEL ','YEMP_SELFEMP_2009_01-YEMP_SELFEMP_2009_08 E09 E10-E15'); CALL SYMPUT ('R13STAD ','YEMP_STARTDATE_2009_D_01-YEMP_STARTDATE_2009_D_09 E10-E15'); CALL SYMPUT ('R13STAM ','YEMP_STARTDATE_2009_M_01-YEMP_STARTDATE_2009_M_09 E10-E15'); CALL SYMPUT ('R13STAY ','YEMP_STARTDATE_2009_Y_01-YEMP_STARTDATE_2009_Y_09 E10-E15'); CALL SYMPUT ('R13STOD ','YEMP_STOPDATE_2009_D_01-YEMP_STOPDATE_2009_D_09 E10-E15'); CALL SYMPUT ('R13STOM ','YEMP_STOPDATE_2009_M_01-YEMP_STOPDATE_2009_M_09 E10-E15'); CALL SYMPUT ('R13STOY ','YEMP_STOPDATE_2009_Y_01-YEMP_STOPDATE_2009_Y_09 E10-E15'); CALL SYMPUT ('R13TEN ','CV_WKSWK_JOB_DLI_2009_01-CV_WKSWK_JOB_DLI_2009_09 E10-E15'); CALL SYMPUT ('R13UID ','YEMP_UID_2009_01-YEMP_UID_2009_09 E10-E15'); CALL SYMPUT ('R14COM ','CV_HRLY_COMPENSATION_2010_01-CV_HRLY_COMPENSATION_2010_09 E10-E15'); CALL SYMPUT ('R14MIL ','YEMP_MILFLAG_2010_01-YEMP_MILFLAG_2010_09 E10-E15'); CALL SYMPUT ('R14PAY ','CV_HRLY_PAY_2010_01-CV_HRLY_PAY_2010_09 E10-E15'); CALL SYMPUT ('R14SEL ','YEMP_SELFEMP_2010_01-YEMP_SELFEMP_2010_09 E10-E15'); CALL SYMPUT ('R14STAD ','YEMP_STARTDATE_2010_D_01-YEMP_STARTDATE_2010_D_09 E10-E15'); CALL SYMPUT ('R14STAM ','YEMP_STARTDATE_2010_M_01-YEMP_STARTDATE_2010_M_09 E10-E15'); CALL SYMPUT ('R14STAY ','YEMP_STARTDATE_2010_Y_01-YEMP_STARTDATE_2010_Y_09 E10-E15'); CALL SYMPUT ('R14STOD ','YEMP_STOPDATE_2010_D_01-YEMP_STOPDATE_2010_D_09 E10-E15'); CALL SYMPUT ('R14STOM ','YEMP_STOPDATE_2010_M_01-YEMP_STOPDATE_2010_M_09 E10-E15'); CALL SYMPUT ('R14STOY ','YEMP_STOPDATE_2010_Y_01-YEMP_STOPDATE_2010_Y_09 E10-E15'); CALL SYMPUT ('R14TEN ','CV_WKSWK_JOB_DLI_2010_01-CV_WKSWK_JOB_DLI_2010_09 E10-E15'); CALL SYMPUT ('R14UID ','YEMP_UID_2010_01-YEMP_UID_2010_09 E10-E15'); CALL SYMPUT ('R15COM ','CV_HRLY_COMPENSATION_2011_01-CV_HRLY_COMPENSATION_2011_13 E14-E15'); CALL SYMPUT ('R15MIL ','YEMP_MILFLAG_2011_01-YEMP_MILFLAG_2011_13 E14-E15'); CALL SYMPUT ('R15PAY ','CV_HRLY_PAY_2011_01-CV_HRLY_PAY_2011_13 E14-E15'); CALL SYMPUT ('R15SEL ','YEMP_SELFEMP_2011_01-YEMP_SELFEMP_2011_13 E14-E15'); CALL SYMPUT ('R15STAD ','YEMP_STARTDATE_2011_D_01-YEMP_STARTDATE_2011_D_13 E14-E15'); CALL SYMPUT ('R15STAM ','YEMP_STARTDATE_2011_M_01-YEMP_STARTDATE_2011_M_13 E14-E15'); CALL SYMPUT ('R15STAY ','YEMP_STARTDATE_2011_Y_01-YEMP_STARTDATE_2011_Y_13 E14-E15'); CALL SYMPUT ('R15STOD ','YEMP_STOPDATE_2011_D_01-YEMP_STOPDATE_2011_D_13 E14-E15'); CALL SYMPUT ('R15STOM ','YEMP_STOPDATE_2011_M_01-YEMP_STOPDATE_2011_M_13 E14-E15'); CALL SYMPUT ('R15STOY ','YEMP_STOPDATE_2011_Y_01-YEMP_STOPDATE_2011_Y_13 E14-E15'); CALL SYMPUT ('R15TEN ','CV_WKSWK_JOB_DLI_2011_01-CV_WKSWK_JOB_DLI_2011_13 E14-E15'); CALL SYMPUT ('R15UID ','YEMP_UID_2011_01-YEMP_UID_2011_13 E14-E15'); CALL SYMPUT ('R16COM ','CV_HRLY_COMPENSATION_2013_01-CV_HRLY_COMPENSATION_2013_10 E11-E15'); CALL SYMPUT ('R16MIL ','YEMP_MILFLAG_2013_01-YEMP_MILFLAG_2013_10 E11-E15'); CALL SYMPUT ('R16PAY ','CV_HRLY_PAY_2013_01-CV_HRLY_PAY_2013_10 E11-E15'); CALL SYMPUT ('R16SEL ','YEMP_SELFEMP_2013_01-YEMP_SELFEMP_2013_10 E11-E15'); CALL SYMPUT ('R16STAD ','YEMP_STARTDATE_2013_D_01-YEMP_STARTDATE_2013_D_10 E11-E15'); CALL SYMPUT ('R16STAM ','YEMP_STARTDATE_2013_M_01-YEMP_STARTDATE_2013_M_10 E11-E15'); CALL SYMPUT ('R16STAY ','YEMP_STARTDATE_2013_Y_01-YEMP_STARTDATE_2013_Y_10 E11-E15'); CALL SYMPUT ('R16STOD ','YEMP_STOPDATE_2013_D_01-YEMP_STOPDATE_2013_D_10 E11-E15'); CALL SYMPUT ('R16STOM ','YEMP_STOPDATE_2013_M_01-YEMP_STOPDATE_2013_M_10 E11-E15'); CALL SYMPUT ('R16STOY ','YEMP_STOPDATE_2013_Y_01-YEMP_STOPDATE_2013_Y_10 E11-E15'); CALL SYMPUT ('R16TEN ','CV_WKSWK_JOB_DLI_2013_01-CV_WKSWK_JOB_DLI_2013_10 E11-E15'); CALL SYMPUT ('R16UID ','YEMP_UID_2013_01-YEMP_UID_2013_10 E11-E15'); CALL SYMPUT ('R17COM ','CV_HRLY_COMPENSATION_2015_01-CV_HRLY_COMPENSATION_2015_12 E13-E15'); CALL SYMPUT ('R17MIL ','YEMP_MILFLAG_2015_01-YEMP_MILFLAG_2015_12 E13-E15'); CALL SYMPUT ('R17PAY ','CV_HRLY_PAY_2015_01-CV_HRLY_PAY_2015_12 E13-E15'); CALL SYMPUT ('R17SEL ','YEMP_SELFEMP_2015_01-YEMP_SELFEMP_2015_12 E13-E15'); CALL SYMPUT ('R17STAD ','YEMP_STARTDATE_2015_D_01-YEMP_STARTDATE_2015_D_12 E13-E15'); CALL SYMPUT ('R17STAM ','YEMP_STARTDATE_2015_M_01-YEMP_STARTDATE_2015_M_12 E13-E15'); CALL SYMPUT ('R17STAY ','YEMP_STARTDATE_2015_Y_01-YEMP_STARTDATE_2015_Y_12 E13-E15'); CALL SYMPUT ('R17STOD ','YEMP_STOPDATE_2015_D_01-YEMP_STOPDATE_2015_D_12 E13-E15'); CALL SYMPUT ('R17STOM ','YEMP_STOPDATE_2015_M_01-YEMP_STOPDATE_2015_M_12 E13-E15'); CALL SYMPUT ('R17STOY ','YEMP_STOPDATE_2015_Y_01-YEMP_STOPDATE_2015_Y_12 E13-E15'); CALL SYMPUT ('R17TEN ','CV_WKSWK_JOB_DLI_2015_01-CV_WKSWK_JOB_DLI_2015_12 E13-E15'); CALL SYMPUT ('R17UID ','YEMP_UID_2015_01-YEMP_UID_2015_12 E13-E15'); CALL SYMPUT ('R18COM ','CV_HRLY_COMPENSATION_2017_01-CV_HRLY_COMPENSATION_2017_15'); CALL SYMPUT ('R18MIL ','YEMP_MILFLAG_2017_01-YEMP_MILFLAG_2017_15'); CALL SYMPUT ('R18PAY ','CV_HRLY_PAY_2017_01-CV_HRLY_PAY_2017_15'); CALL SYMPUT ('R18SEL ','YEMP_SELFEMP_2017_01-YEMP_SELFEMP_2017_15'); CALL SYMPUT ('R18STAD ','YEMP_STARTDATE_2017_D_01-YEMP_STARTDATE_2017_D_15'); CALL SYMPUT ('R18STAM ','YEMP_STARTDATE_2017_M_01-YEMP_STARTDATE_2017_M_15'); CALL SYMPUT ('R18STAY ','YEMP_STARTDATE_2017_Y_01-YEMP_STARTDATE_2017_Y_15'); CALL SYMPUT ('R18STOD ','YEMP_STOPDATE_2017_D_01-YEMP_STOPDATE_2017_D_15'); CALL SYMPUT ('R18STOM ','YEMP_STOPDATE_2017_M_01-YEMP_STOPDATE_2017_M_15'); CALL SYMPUT ('R18STOY ','YEMP_STOPDATE_2017_Y_01-YEMP_STOPDATE_2017_Y_15'); CALL SYMPUT ('R18TEN ','CV_WKSWK_JOB_DLI_2017_01-CV_WKSWK_JOB_DLI_2017_15'); CALL SYMPUT ('R18UID ','YEMP_UID_2017_01-YEMP_UID_2017_15'); CALL SYMPUT ('R18HRS ','CVC_HOURS_WK_YR_ALL_80-CVC_HOURS_WK_YR_ALL_99 CVC_HOURS_WK_YR_ALL_00-CVC_HOURS_WK_YR_ALL_18 Y19 Y20'); CALL SYMPUT ('R18SHRS ','Y80-Y97 CVC_HOURS_WK_YR_SE_98 CVC_HOURS_WK_YR_SE_99 CVC_HOURS_WK_YR_SE_00-CVC_HOURS_WK_YR_SE_18 Y19 Y20'); CALL SYMPUT ('R18EHRS ','CVC_HOURS_WK_YR_ET_80-CVC_HOURS_WK_YR_ET_99 CVC_HOURS_WK_YR_ET_00-CVC_HOURS_WK_YR_ET_18 Y19 Y20'); CALL SYMPUT ('R18JOB ','CVC_TTL_JOB_YR_ALL_80-CVC_TTL_JOB_YR_ALL_99 CVC_TTL_JOB_YR_ALL_00-CVC_TTL_JOB_YR_ALL_18 Y19 Y20'); CALL SYMPUT ('R18SELF ','Y80-Y97 CVC_TTL_JOB_YR_SE_98 CVC_TTL_JOB_YR_SE_99 CVC_TTL_JOB_YR_SE_00-CVC_TTL_JOB_YR_SE_18 Y19 Y20'); CALL SYMPUT ('R18EMP ','CVC_TTL_JOB_YR_ET_80-CVC_TTL_JOB_YR_ET_99 CVC_TTL_JOB_YR_ET_00-CVC_TTL_JOB_YR_ET_18 Y19 Y20'); CALL SYMPUT ('R18WKS ','CVC_WKSWK_YR_ALL_80-CVC_WKSWK_YR_ALL_99 CVC_WKSWK_YR_ALL_00-CVC_WKSWK_YR_ALL_18 Y19 Y20'); CALL SYMPUT ('R18SWKS ','Y80-Y97 CVC_WKSWK_YR_SE_98 CVC_WKSWK_YR_SE_99 CVC_WKSWK_YR_SE_00-CVC_WKSWK_YR_SE_18 Y19 Y20'); CALL SYMPUT ('R18EWKS ','CVC_WKSWK_YR_ET_80-CVC_WKSWK_YR_ET_99 CVC_WKSWK_YR_ET_00-CVC_WKSWK_YR_ET_18 Y19 Y20'); proc sort; by pubid; data empstatus; set r19.empstatus; data emp_deny; merge r19.emp_int three(keep= pubid YEMP_9899M_01-YEMP_9899M_04) one(keep= pubid YEMP_UID_2017_01-YEMP_UID_2017_15 YEMP_UID_2015_01-YEMP_UID_2015_12 YEMP_UID_2013_01-YEMP_UID_2013_10 YEMP_UID_2011_01-YEMP_UID_2011_13 YEMP_UID_2010_01-YEMP_UID_2010_09 YEMP_UID_2009_01-YEMP_UID_2009_09 YEMP_UID_2008_01-YEMP_UID_2008_08 YEMP_UID_2007_01-YEMP_UID_2007_08 YEMP_UID_2006_01-YEMP_UID_2006_09 YEMP_UID_2005_01-YEMP_UID_2005_09 YEMP_UID_2004_01-YEMP_UID_2004_07 YEMP_UID_2003_01-YEMP_UID_2003_10 YEMP_UID_2002_01-YEMP_UID_2002_11 YEMP_UID_2001_01-YEMP_UID_2001_08 YEMP_UID_2000_01-YEMP_UID_2000_09); by pubid; if r0int>-5; array r18uid YEMP_UID_2017_01-YEMP_UID_2017_15; array r17uid YEMP_UID_2015_01-YEMP_UID_2015_12 E13-E15; array r16uid YEMP_UID_2013_01-YEMP_UID_2013_10 E11-E15; array r15uid YEMP_UID_2011_01-YEMP_UID_2011_13 E14-E15; array r14uid YEMP_UID_2010_01-YEMP_UID_2010_09 E10-E15; array r13uid YEMP_UID_2009_01-YEMP_UID_2009_09 E10-E15; array r12uid YEMP_UID_2008_01-YEMP_UID_2008_08 E09-E15; array r11uid YEMP_UID_2007_01-YEMP_UID_2007_08 E09-E15; array r10uid YEMP_UID_2006_01-YEMP_UID_2006_09 E10-E15; array r9uid YEMP_UID_2005_01-YEMP_UID_2005_09 E10-E15; array r8uid YEMP_UID_2004_01-YEMP_UID_2004_07 E08-E15; array r7uid YEMP_UID_2003_01-YEMP_UID_2003_09 E10-E15; array r6uid YEMP_UID_2002_01-YEMP_UID_2002_11 E12-E15; array r5uid YEMP_UID_2001_01-YEMP_UID_2001_08 E09-E15; array r4uid YEMP_UID_2000_01-YEMP_UID_2000_09 E10-E15; array dliuid dliuid1-dliuid15; do over dliuid; if r18uid>0 then dliuid=r18uid; if r18uid le 0 and r17uid>0 then dliuid=r17uid; if r18uid le 0 and r17uid le 0 and r16uid>0 then dliuid=r16uid; if r18uid le 0 and r17uid le 0 and r16uid le 0 and r15uid>0 then dliuid=r15uid; if r18uid le 0 and r17uid le 0 and r16uid le 0 and r15uid le 0 and r14uid>0 then dliuid=r14uid; if r18uid le 0 and r17uid le 0 and r16uid le 0 and r15uid le 0 and r14uid le 0 and r13uid>0 then dliuid=r13uid; if r18uid le 0 and r17uid le 0 and r16uid le 0 and r15uid le 0 and r14uid le 0 and r13uid le 0 and r12uid>0 then dliuid=r12uid; if r18uid le 0 and r17uid le 0 and r16uid le 0 and r15uid le 0 and r14uid le 0 and r13uid le 0 and r12uid le 0 and r11uid>0 then dliuid=r11uid; if r18uid le 0 and r17uid le 0 and r16uid le 0 and r15uid le 0 and r14uid le 0 and r13uid le 0 and r12uid le 0 and r11uid le 0 and r10uid>0 then dliuid=r10uid; if r18uid le 0 and r17uid le 0 and r16uid le 0 and r15uid le 0 and r14uid le 0 and r13uid le 0 and r12uid le 0 and r11uid le 0 and r10uid le 0 and r9uid>0 then dliuid=r9uid; if r18uid le 0 and r17uid le 0 and r16uid le 0 and r15uid le 0 and r14uid le 0 and r13uid le 0 and r12uid le 0 and r11uid le 0 and r10uid le 0 and r9uid le 0 and r8uid>0 then dliuid=r8uid; if r18uid le 0 and r17uid le 0 and r16uid le 0 and r15uid le 0 and r14uid le 0 and r13uid le 0 and r12uid le 0 and r11uid le 0 and r10uid le 0 and r9uid le 0 and r8uid le 0 and r7uid>0 then dliuid=r7uid; if r18uid le 0 and r17uid le 0 and r16uid le 0 and r15uid le 0 and r14uid le 0 and r13uid le 0 and r12uid le 0 and r11uid le 0 and r10uid le 0 and r9uid le 0 and r8uid le 0 and r7uid le 0 and r6uid>0 then dliuid=r6uid; if r18uid le 0 and r17uid le 0 and r16uid le 0 and r15uid le 0 and r14uid le 0 and r13uid le 0 and r12uid le 0 and r11uid le 0 and r10uid le 0 and r9uid le 0 and r8uid le 0 and r7uid le 0 and r6uid le 0 and r5uid>0 then dliuid=r5uid; if r18uid le 0 and r17uid le 0 and r16uid le 0 and r15uid le 0 and r14uid le 0 and r13uid le 0 and r12uid le 0 and r11uid le 0 and r10uid le 0 and r9uid le 0 and r8uid le 0 and r7uid le 0 and r6uid le 0 and r5uid le 0 and r4uid>0 then dliuid=r4uid; end; array E9899M &E9899m; do over E9899M; if e9899m=2 and deny1>0 and deny2>0 and deny3=. then deny3=dliuid; if e9899m=2 and deny1>0 and deny2=. then deny2=dliuid; if e9899m=2 and deny1=. then deny1=dliuid; end; run; data total_numwks; merge one r19.emp_int r19.emp_week(keep=pubid bstar dliwk) r19.emp29_numwks empstatus; by pubid; *last interview round; array intwk r1int -- r18int; C=0; do over intwk; C+1; if intwk>0 then do; dliwk=intwk; dli_r=C; end; end; *last interview year; array intyr 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 r0int_y; do over intyr; if intyr>0 then do; dli_y=intyr; end; end; if r0int>-5 then dli_r=19; array rXwks (i) &R18WKS; array rXswks (i) &R18SWKS; array rXewks (i) &R18EWKS; array r0wks (i) R0wks80-R0wks99 R0wks00-R0wks20; array r0swks (i) Y80-Y97 R0swks98-R0swks99 R0swks00-R0swks20; array r0ewks (i) R0ewks80-R0ewks99 R0ewks00-R0ewks20; array twks (i) twks80-twks99 twks00-twks20; array tewks (i) tewks80-tewks99 tewks00-tewks20; array tswks (i) Y80-Y97 tswks98-tswks99 tswks00-tswks20; array yr (i) yr1-yr41 (17*1980 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020); do over twks; twks=0; tswks=0; tewks=0; if r0wks>0 then twks=twks+r0wks; if r0wks in (-1,-2,-3) then twks=-3; if r0swks>0 then tswks=tswks+r0swks; if r0swks in (-1,-2,-3) then tswks=-3; if r0ewks>0 then tewks=tewks+r0ewks; if r0ewks in (-1,-2,-3) then tewks=-3; if twks ne -3 and rXwks>0 then twks=twks+rXwks; if rXwks in (-1,-2,-3) then twks=-3; if tswks ne -3 and rXswks>0 then tswks=tswks+rXswks; if rXswks in (-1,-2,-3) then tswks=-3; if tewks ne -3 and rXewks>0 then tewks=tewks+rXewks; if rXewks in (-1,-2,-3) then tewks=-3; if yr>dli_y then do; if twks=0 then twks=-4; if tswks=0 then tswks=-4; if tewks=0 then tewks=-4; end; end; drop Y80-Y97; array r7ar (j) _1-_735 EMP_STATUS_1994_06 -- 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; if bstar>0 then do; bchange=0; do j=bstar to dliwk; if r7ar=0 then bchange=bchange+1; end; end; drop _1-_730; run; data match; merge one three; by pubid; array r0uid (j) &R0uid; array r0mil (j) &R0mil; array r18uid (i) &R18uid; array r17uid (i) &R17uid; array r16uid (i) &R16uid; array r15uid (i) &R15uid; array r14uid (i) &R14uid; array r13uid (i) &R13uid; array r12uid (i) &R12uid; array r11uid (i) &R11uid; array r10uid (i) &R10uid; array r9uid (i) &R9uid; array r8uid (i) &R8uid; array r7uid (i) &R7UID; array r6uid (i) &R6uid; array r5uid (i) &R5UID; array r4uid (i) &R4uid; array r3uid (i) &R3uid; array r2uid (i) &R2UID; array r1uid (i) &R1uid; array match {15,11} match1_1-match1_11 match2_1-match2_11 match3_1-match3_11 match4_1-match4_11 match5_1-match5_11 match6_1-match6_11 match7_1-match7_11 match8_1-match8_11 match9_1-match9_11 match10_1-match10_11 match11_1-match11_11 match12_1-match12_11 match13_1-match13_11 match14_1-match14_11 match15_1-match15_11; do i=1 to 9; if r1uid>0 then do; do j=1 to 11; if r0mil ne 1 and r1uid=r0uid and r2uid ne r0uid and r3uid ne r0uid and r4uid ne r0uid and r5uid ne r0uid and r6uid ne r0uid and r7uid ne r0uid and r8uid ne r0uid and r9uid ne r0uid and r10uid ne r0uid and r11uid ne r0uid and r12uid ne r0uid and r13uid ne r0uid and r14uid ne r0uid and r15uid ne r0uid and r16uid ne r0uid and r17uid ne r0uid and r18uid ne r0uid then match(i,j)=1; end; end; end; do i=1 to 9; if r2uid>0 then do; do j=1 to 11; if r0mil ne 1 and r2uid=r0uid and r3uid ne r0uid and r4uid ne r0uid and r5uid ne r0uid and r6uid ne r0uid and r7uid ne r0uid and r8uid ne r0uid and r9uid ne r0uid and R10uid ne r0uid and r11uid ne r0uid and r12uid ne r0uid and r13uid ne r0uid and r14uid ne r0uid and r15uid ne r0uid and r16uid ne r0uid and r17uid ne r0uid and r18uid ne r0uid then match(i,j)=2; end; end; end; do i=1 to 9; if r3uid>0 then do; do j=1 to 11; if r0mil ne 1 and r3uid=r0uid and r4uid ne r0uid and r5uid ne r0uid and r6uid ne r0uid and r7uid ne r0uid and r8uid ne r0uid and r9uid ne r0uid and R10uid ne r0uid and r11uid ne r0uid and r12uid ne r0uid and r13uid ne r0uid and r14uid ne r0uid and r15uid ne r0uid and r16uid ne r0uid and r17uid ne r0uid and r18uid ne r0uid then match(i,j)=3; end; end; end; do i=1 to 9; if r4uid>0 then do; do j=1 to 11; if r0mil ne 1 and r4uid=r0uid and r5uid ne r0uid and r6uid ne r0uid and r7uid ne r0uid and r8uid ne r0uid and r9uid ne r0uid and R10uid ne r0uid and r11uid ne r0uid and r12uid ne r0uid and r13uid ne r0uid and r14uid ne r0uid and r15uid ne r0uid and r16uid ne r0uid and r17uid ne r0uid and r18uid ne r0uid then match(i,j)=4; end; end; end; do i=1 to 8; if r5uid>0 then do; do j=1 to 11; if r0mil ne 1 and r5uid=r0uid and r6uid ne r0uid and r7uid ne r0uid and r8uid ne r0uid and r9uid ne r0uid and R10uid ne r0uid and r11uid ne r0uid and r12uid ne r0uid and r13uid ne r0uid and r14uid ne r0uid and r15uid ne r0uid and r16uid ne r0uid and r17uid ne r0uid and r18uid ne r0uid then match(i,j)=5; end; end; end; do i=1 to 11; if r6uid>0 then do; do j=1 to 11; if r0mil ne 1 and r6uid=r0uid and r7uid ne r0uid and r8uid ne r0uid and r9uid ne r0uid and R10uid ne r0uid and r11uid ne r0uid and r12uid ne r0uid and r13uid ne r0uid and r14uid ne r0uid and r15uid ne r0uid and r16uid ne r0uid and r17uid ne r0uid and r18uid ne r0uid then match(i,j)=6; end; end; end; do i=1 to 10; if r7uid>0 then do; do j=1 to 11; if r0mil ne 1 and r7uid=r0uid and r8uid ne r0uid and r9uid ne r0uid and R10uid ne r0uid and r11uid ne r0uid and r12uid ne r0uid and r13uid ne r0uid and r14uid ne r0uid and r15uid ne r0uid and r16uid ne r0uid and r17uid ne r0uid and r18uid ne r0uid then match(i,j)=7; end; end; end; do i=1 to 7; if r8uid>0 then do; do j=1 to 11; if r0mil ne 1 and r8uid=r0uid and r9uid ne r0uid and R10uid ne r0uid and r11uid ne r0uid and r12uid ne r0uid and r13uid ne r0uid and r14uid ne r0uid and r15uid ne r0uid and r16uid ne r0uid and r17uid ne r0uid and r18uid ne r0uid then match(i,j)=8; end; end; end; do i=1 to 9; if r9uid>0 then do; do j=1 to 11; if r0mil ne 1 and r9uid=r0uid and R10uid ne r0uid and r11uid ne r0uid and r12uid ne r0uid and r13uid ne r0uid and r14uid ne r0uid and r15uid ne r0uid and r16uid ne r0uid and r17uid ne r0uid and r18uid ne r0uid then match(i,j)=9; end; end; end; do i=1 to 9; if r10uid>0 then do; do j=1 to 11; if r0mil ne 1 and r10uid=r0uid and r11uid ne r0uid and r12uid ne r0uid and r13uid ne r0uid and r14uid ne r0uid and r15uid ne r0uid and r16uid ne r0uid and r17uid ne r0uid and r18uid ne r0uid then match(i,j)=10; end; end; end; do i=1 to 9; if r11uid>0 then do; do j=1 to 11; if r0mil ne 1 and r11uid = r0uid and r12uid ne r0uid and r13uid ne r0uid and r14uid ne r0uid and r15uid ne r0uid and r16uid ne r0uid and r17uid ne r0uid and r18uid ne r0uid then match(i,j)=11; end; end; end; do i=1 to 9; if r12uid>0 then do; do j=1 to 11; if r0mil ne 1 and r12uid = r0uid and r13uid ne r0uid and r14uid ne r0uid and r15uid ne r0uid and r16uid ne r0uid and r17uid ne r0uid and r18uid ne r0uid then match(i,j)=12; end; end; end; do i=1 to 9; if r13uid>0 then do; do j=1 to 11; if r0mil ne 1 and r13uid = r0uid and r14uid ne r0uid and r15uid ne r0uid and r16uid ne r0uid and r17uid ne r0uid and r18uid ne r0uid then match(i,j)=13; end; end; end; do i=1 to 9; if r14uid>0 then do; do j=1 to 11; if r0mil ne 1 and r14uid = r0uid and r15uid ne r0uid and r16uid ne r0uid and r17uid ne r0uid and r18uid ne r0uid then match(i,j)=14; end; end; end; do i=1 to 13; if r15uid>0 then do; do j=1 to 11; if r0mil ne 1 and r15uid = r0uid and r16uid ne r0uid and r17uid ne r0uid and r18uid ne r0uid then match(i,j)=15; end; end; end; do i=1 to 10; if r16uid>0 then do; do j=1 to 11; if r0mil ne 1 and r16uid = r0uid and r17uid ne r0uid and r18uid ne r0uid then match(i,j)=16; end; end; end; do i=1 to 12; if r17uid>0 then do; do j=1 to 11; if r0mil ne 1 and r17uid = r0uid and r18uid ne r0uid then match(i,j)=17; end; end; end; do i=1 to 15; if r18uid>0 then do; do j=1 to 11; if r0mil ne 1 and r18uid = r0uid then match(i,j)=18; end; end; end; array match1 (j) match1_1-match1_11; array match2 (j) match2_1-match2_11; array match3 (j) match3_1-match3_11; array match4 (j) match4_1-match4_11; array match5 (j) match5_1-match5_11; array match6 (j) match6_1-match6_11; array match7 (j) match7_1-match7_11; array match8 (j) match8_1-match8_11; array match9 (j) match9_1-match9_11; array match10 (j) match10_1-match10_11; array match11 (j) match11_1-match11_11; array match12 (j) match12_1-match12_11; array match13 (j) match13_1-match13_11; array match14 (j) match14_1-match14_11; array match15 (j) match15_1-match15_11; do over match1; if match1 ne max(of match1-match15) then match1=.; if match2 ne max(of match1-match15) then match2=.; if match3 ne max(of match1-match15) then match3=.; if match4 ne max(of match1-match15) then match4=.; if match5 ne max(of match1-match15) then match5=.; if match6 ne max(of match1-match15) then match6=.; if match7 ne max(of match1-match15) then match7=.; if match8 ne max(of match1-match15) then match8=.; if match9 ne max(of match1-match15) then match9=.; if match10 ne max(of match1-match15) then match10=.; if match11 ne max(of match1-match15) then match11=.; if match12 ne max(of match1-match15) then match12=.; if match13 ne max(of match1-match15) then match13=.; end; proc freq; table match1_1; run; data total_tenure; merge one three r19.emp_int r19.emp32_jobten match; by pubid; if r0int>-5; array match1 (j) match1_1-match1_11; array match2 (j) match2_1-match2_11; array match3 (j) match3_1-match3_11; array match4 (j) match4_1-match4_11; array match5 (j) match5_1-match5_11; array match6 (j) match6_1-match6_11; array match7 (j) match7_1-match7_11; array match8 (j) match8_1-match8_11; array match9 (j) match9_1-match9_11; array match10 (j) match10_1-match10_11; array match11 (j) match11_1-match11_11; array match12 (j) match12_1-match12_11; array match13 (j) match13_1-match13_11; array match14 (j) match14_1-match14_11; array match15 (j) match15_1-match15_11; array r0ten (j) r0ten1-r0ten11; array totten (j) totten1-totten11; do j=1 to 11; totten=0; if r0ten ne . then totten=totten+r0ten; end; array match {15,11} match1_1-match1_11 match2_1-match2_11 match3_1-match3_11 match4_1-match4_11 match5_1-match5_11 match6_1-match6_11 match7_1-match7_11 match8_1-match8_11 match9_1-match9_11 match10_1-match10_11 match11_1-match11_11 match12_1-match12_11 match13_1-match13_11 match14_1-match14_11 match15_1-match15_11; array r18ten (i) &R18ten; array r17ten (i) &R17ten; array r16ten (i) &R16ten; array r15ten (i) &R15ten; array r14ten (i) &R14ten; array r13ten (i) &R13ten; array r12ten (i) &R12ten; array r11ten (i) &R11ten; array r10ten (i) &R10ten; array r9ten (i) &R9ten; array r8ten (i) &R8ten; array r7ten (i) &R7ten; array r6ten (i) &R6ten; array r5ten (i) &R5ten; array r4ten (i) &R4ten; array r3ten (i) &R3ten; array r2ten (i) &R2ten; array r1ten (i) &R1ten; do j=1 to 11; if totten ge 0 then do; do i=1 to 15; if match(i,j)=18 and r18ten>0 then totten=totten+r18ten; if match(i,j)=18 and r18ten=-3 then totten=-3; if match(i,j)=17 and r17ten>0 then totten=totten+r17ten; if match(i,j)=17 and r17ten=-3 then totten=-3; if match(i,j)=16 and r16ten>0 then totten=totten+r16ten; if match(i,j)=16 and r16ten=-3 then totten=-3; if match(i,j)=15 and r15ten>0 then totten=totten+r15ten; if match(i,j)=15 and r15ten=-3 then totten=-3; if match(i,j)=14 and r14ten>0 then totten=totten+r14ten; if match(i,j)=14 and r14ten=-3 then totten=-3; if match(i,j)=13 and r13ten>0 then totten=totten+r13ten; if match(i,j)=13 and r13ten=-3 then totten=-3; if match(i,j)=12 and r12ten>0 then totten=totten+r12ten; if match(i,j)=12 and r12ten=-3 then totten=-3; if match(i,j)=11 and r11ten>0 then totten=totten+r11ten; if match(i,j)=11 and r11ten=-3 then totten=-3; if match(i,j)=10 and r10ten>0 then totten=totten+r10ten; if match(i,j)=10 and r10ten=-3 then totten=-3; if match(i,j)=9 and r9ten>0 then totten=totten+r9ten; if match(i,j)=9 and r9ten=-3 then totten=-3; if match(i,j)=8 and r8ten>0 then totten=totten+r8ten; if match(i,j)=8 and r8ten=-3 then totten=-3; if match(i,j)=7 and r7ten>0 then totten=totten+r7ten; if match(i,j)=7 and r7ten=-3 then totten=-3; if match(i,j)=6 and r6ten>0 then totten=totten+r6ten; if match(i,j)=6 and r6ten=-3 then totten=-3; if match(i,j)=5 and r5ten>0 then totten=totten+r5ten; if match(i,j)=5 and r5ten=-3 then totten=-3; if match(i,j)=4 and r4ten>0 then totten=totten+r4ten; if match(i,j)=4 and r4ten=-3 then totten=-3; if match(i,j)=3 and r3ten>0 then totten=totten+r3ten; if match(i,j)=3 and r3ten=-3 then totten=-3; if match(i,j)=2 and r2ten>0 then totten=totten+r2ten; if match(i,j)=2 and r2ten=-3 then totten=-3; if match(i,j)=1 and r1ten>0 then totten=totten+r1ten; if match(i,j)=1 and r1ten=-3 then totten=-3; if match(i,j)=-3 then totten=-3; end; end; end; do j=1 to 11; if r0ten=. then totten=.; end; run; data total_anhrs; merge one r19.emp_int r19.emp33_anhours total_numwks(keep=pubid dli_y);by pubid; array thrs (k) thrs80-thrs99 thrs00-thrs20; array tshrs (k) Y80-Y97 tshrs98-tshrs99 tshrs00-tshrs20; array tehrs (k) tehrs80-tehrs99 tehrs00-tehrs20; array rXhrs (k) &R18hrs; array rXshrs (k) &R18shrs; array rXehrs (k) &R18ehrs; array r0hrs (k) r0hrs80-r0hrs99 r0hrs00-r0hrs20; array r0shrs (k) Y80-Y97 r0shrs98-r0shrs99 r0shrs00-r0shrs20; array r0ehrs (k) r0ehrs80-r0ehrs99 r0ehrs00-r0ehrs20; array yr (k) yr1-yr41 (17*1980 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020); do k=1 to 41; thrs=0; tshrs=0; tehrs=0; if r0hrs>0 then thrs=thrs+r0hrs; if -40 then tshrs=tshrs+r0shrs; if -40 then tehrs=tehrs+r0ehrs; if -40 then thrs=thrs+rXhrs; if -40 then tshrs=tshrs+rXshrs; if -40 then tehrs=tehrs+rXehrs; if -4dli_y then do; if thrs=0 then thrs=-4; if tshrs=0 then tshrs=-4; if tehrs=0 then tehrs=-4; end; end; run; data total_wksage14; merge one r19.emp_int r19.emp34_wksage14; by pubid; rXewksage14=CVC_WKSWK_TEEN; rXewksage20=CVC_WKSWK_ADULT_ET; rXwksage20=CVC_WKSWK_ADULT_ALL; twksage20=0; tewksage20=0; tewksage14=0; if r0wksage20>0 then twksage20=twksage20+r0wksage20; if r0ewksage20>0 then tewksage20=tewksage20+r0ewksage20; if r0ewksage14>0 then tewksage14=tewksage14+r0ewksage14; if r0wksage20 in (-3) then twksage20=-3; if r0ewksage20 in (-3) then tewksage20=-3; if r0ewksage14 in (-3) then tewksage14=-3; if twksage20 not in (-3) and rXwksage20>0 then twksage20=twksage20+rXwksage20; if rXwksage20=-3 then twksage20=-3; if tewksage20 not in (-3) and rXewksage20>0 then tewksage20=tewksage20+rXewksage20; if rXewksage20=-3 then tewksage20=-3; if tewksage14 not in (-3) and rXewksage14>0 then tewksage14=tewksage14+rXewksage14; if rXewksage14=-3 then tewksage14=-3; run; data total_hrsage14; merge one r19.emp_int r19.emp35_hrsage14; by pubid; rXehrsage14=CVC_HOURS_WK_TEEN; rXehrsage20=CVC_HOURS_WK_ADULT_ET; rXhrsage20=CVC_HOURS_WK_ADULT_ALL; tehrsage14=0; thrsage20=0; tehrsage20=0; if r0ehrsage14=>0 then tehrsage14=tehrsage14+r0ehrsage14; if r0ehrsage14=-3 then tehrsage14=-3; if r0ehrsage20=>0 then tehrsage20=tehrsage20+r0ehrsage20; if r0ehrsage20=-3 then tehrsage20=-3; if r0hrsage20=>0 then thrsage20=thrsage20+r0hrsage20; if r0hrsage20=-3 then thrsage20=-3; if tehrsage14 ge 0 then do; if rXehrsage14>0 then tehrsage14=tehrsage14+rXehrsage14; if rXehrsage14=-3 then tehrsage14=-3; end; if tehrsage20 ge 0 then do; if rXehrsage20>0 then tehrsage20=tehrsage20+rXehrsage20; if rXehrsage20=-3 then tehrsage20=-3; end; if thrsage20 ge 0 then do; if rXhrsage20>0 then thrsage20=thrsage20+rXhrsage20; if rXhrsage20=-3 then thrsage20=-3; end; run; data total_numjobs; merge one r19.emp36_numjobs total_numwks(keep=pubid dli_y); by pubid; array rXjob (k) &R18job; array rXself (k) &R18self; array rXemp (k) &R18emp; array r0job (k) r0job80-r0job99 r0job00-r0job20; array r0self (k) r0self80-r0self99 r0self00-r0self20; array r0emp (k) r0emp80-r0emp99 r0emp00-r0emp20; array tjob (k) tjob80-tjob99 tjob00-tjob20; array tsjob (k) tsjob80-tsjob99 tsjob00-tsjob20; array tejob (k) tejob80-tejob99 tejob00-tejob20; array yr (k) yr1-yr41 (17*1980 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020); do over tjob; tjob=rXjob; tsjob=rXself; tejob=rXemp; if tjob=-4 |tjob=. then tjob=0; if tsjob=-4 |tsjob=. then tsjob=0; if tejob=-4 |tejob=. then tejob=0; if tjob ge 0 and r0job=-3 then tjob=-3; if tsjob ge 0 and r0self=-3 then tsjob=-3; if tejob ge 0 and r0emp=-3 then tejob=-3; if tjob ge 0 and r0job>0 then tjob=tjob+r0job; if tsjob ge 0 and r0self>0 then tsjob=tsjob+r0self; if tejob ge 0 and r0emp>0 then tejob=tejob+r0emp; if yr>dli_y then do; if tjob=0 then tjob=-4; if tsjob=0 then tsjob=-4; if tejob=0 then tejob=-4; end; end; run; data total_numjobs14; merge one r19.emp_int r19.emp37_numjobs14; by pubid; rXempage14=CVC_TTL_JOB_TEEN; rXempage20=CVC_TTL_JOB_ADULT_ET; rXjobage20=CVC_TTL_JOB_ADULT_ALL; array totjob totjobage20 totempage20 totempage14; array r0job r0jobage20 r0empage20 r0empage14; array rXjob rXjobage20 rXempage20 rXempage14; do over totjob; totjob=rXjob; if totjob ge 0 and r0job=-3 then totjob=-3; if totjob ge 0 and r0job>0 then totjob=totjob+r0job; end; run; data total_cvc; merge total_numwks(keep=pubid twks80-twks99 twks00-twks20 tewks80-tewks99 tewks00-tewks20 tswks98-tswks99 tswks00-tswks20 bchange r1int--r18int r0int dliwk dli_r dli_y) total_anhrs(keep=pubid thrs80-thrs99 thrs00-thrs20 tehrs80-tehrs99 tehrs00-tehrs20 tshrs98-tshrs99 tshrs00-tshrs20) total_wksage14(keep=pubid tewksage14 twksage20 tewksage20) total_hrsage14(keep=pubid tehrsage14 thrsage20 tehrsage20) total_numjobs(keep=pubid tjob80-tjob99 tjob00-tjob20 tejob80-tejob99 tejob00-tejob20 tsjob98-tsjob99 tsjob00-tsjob20) total_numjobs14(keep=pubid totempage14 totjobage20 totempage20) r19.emp_int r19.noemp; by pubid; array all twks80-twks97 tewks80-tewks97 thrs80-thrs97 tehrs80-tehrs97 tjob80-tjob97 tejob80-tejob97; do over all; if noemp=1 and all=0 then all=-4; end; run; data total; merge emp_deny(keep=pubid deny1) total_tenure(keep=pubid totten1-totten11) total_cvc; by pubid; array miss deny1--totempage14; do over miss; if miss=. and r0int=-5 then miss=-5; if miss=. and r0int>0 then miss=-4; end; drop noemp; run;