You are here
Home › Cohorts › NLSY97 › Other Documentation › Codebook Supplement › Appendix 2: Employment Variable Creation ›Current or Most Recent Employer - Appendix 2

Current or Most Recent Employer - Appendix 2
Variable Created
- CV_MAINJOB_FLG
For each round, this program creates a variable indicating which employer roster loop contains information for the respondent's current or most recent job (often referred to as the CPS job) at the date of the interview. If the respondent holds more than one job at the same time, the main job is the job at which he or she usually works the most hours. If hours worked are the same, the main job is the one with the earliest start date.
Variables Used
/*Variable Names in the Program Variable Names on the Gator*/
'HRS01'n CV_HRS_PER_WEEK.01
'HRS02'n CV_HRS_PER_WEEK.02
'HRS03'n CV_HRS_PER_WEEK.03
'HRS04'n CV_HRS_PER_WEEK.04
'HRS05'n CV_HRS_PER_WEEK.05
'HRS06'n CV_HRS_PER_WEEK.06
'HRS07'n CV_HRS_PER_WEEK.07
'HRS08'n CV_HRS_PER_WEEK.08
'HRS09'n CV_HRS_PER_WEEK.09
'PUBID'n PUBID
'CUR01'n YEMP_CURFLAG.01
'CUR02'n YEMP_CURFLAG.02
'CUR03'n YEMP_CURFLAG.03
'CUR04'n YEMP_CURFLAG.04
'CUR05'n YEMP_CURFLAG.05
'CUR06'n YEMP_CURFLAG.06
'CUR07'n YEMP_CURFLAG.07
'CUR08'n YEMP_CURFLAG.08
'CUR09'n YEMP_CURFLAG.09
'EnD01'n YEMP_STOPDATE.01~D
'EnM01'n YEMP_STOPDATE.01~M
'EnY01'n YEMP_STOPDATE.01~Y
'EnD02'n YEMP_STOPDATE.02~D
'EnM02'n YEMP_STOPDATE.02~M
'EnY02'n YEMP_STOPDATE.02~Y
'EnD03'n YEMP_STOPDATE.03~D
'EnM03'n YEMP_STOPDATE.03~M
'EnY03'n YEMP_STOPDATE.03~Y
'EnD04'n YEMP_STOPDATE.04~D
'EnM04'n YEMP_STOPDATE.04~M
'EnY04'n YEMP_STOPDATE.04~Y
'EnD05'n YEMP_STOPDATE.05~D
'EnM05'n YEMP_STOPDATE.05~M
'EnY05'n YEMP_STOPDATE.05~Y
'EnD06'n YEMP_STOPDATE.06~D
'EnM06'n YEMP_STOPDATE.06~M
'EnY06'n YEMP_STOPDATE.06~Y
'EnD07'n YEMP_STOPDATE.07~D
'EnM07'n YEMP_STOPDATE.07~M
'EnY07'n YEMP_STOPDATE.07~Y
'EnD08'n YEMP_STOPDATE.08~D
'EnM08'n YEMP_STOPDATE.08~M
'EnY08'n YEMP_STOPDATE.08~Y
'EnD09'n YEMP_STOPDATE.09~D
'EnM09'n YEMP_STOPDATE.09~M
'EnY09'n YEMP_STOPDATE.09~Y
'STD01'n YEMP_STARTDATE.01~D
'STM01'n YEMP_STARTDATE.01~M
'STY01'n YEMP_STARTDATE.01~Y
'STD02'n YEMP_STARTDATE.02~D
'STM02'n YEMP_STARTDATE.02~M
'STY02'n YEMP_STARTDATE.02~Y
'STD03'n YEMP_STARTDATE.03~D
'STM03'n YEMP_STARTDATE.03~M
'STY03'n YEMP_STARTDATE.03~Y
'STD04'n YEMP_STARTDATE.04~D
'STM04'n YEMP_STARTDATE.04~M
'STY04'n YEMP_STARTDATE.04~Y
'STD05'n YEMP_STARTDATE.05~D
'STM05'n YEMP_STARTDATE.05~M
'STY05'n YEMP_STARTDATE.05~Y
'STD06'n YEMP_STARTDATE.06~D
'STM06'n YEMP_STARTDATE.06~M
'STY06'n YEMP_STARTDATE.06~Y
'STD07'n YEMP_STARTDATE.07~D
'STM07'n YEMP_STARTDATE.07~M
'STY07'n YEMP_STARTDATE.07~Y
'STD08'n YEMP_STARTDATE.08~D
'STM08'n YEMP_STARTDATE.08~M
'STY08'n YEMP_STARTDATE.08~Y
'STD09'n YEMP_STARTDATE.09~D
'STM09'n YEMP_STARTDATE.09~M
'STY09'n YEMP_STARTDATE.09~Y
'UID01'n YEMP_UID.01
'UID02'n YEMP_UID.02
'UID03'n YEMP_UID.03
'UID04'n YEMP_UID.04
'UID05'n YEMP_UID.05
'UID06'n YEMP_UID.06
'UID07'n YEMP_UID.07
'UID08'n YEMP_UID.08
'UID09'n YEMP_UID.09
'MIL01'n YEMP_MILFLAG.01
'MIL02'n YEMP_MILFLAG.02
'MIL03'n YEMP_MILFLAG.03
'MIL04'n YEMP_MILFLAG.04
'MIL05'n YEMP_MILFLAG.05
'MIL06'n YEMP_MILFLAG.06
'MIL07'n YEMP_MILFLAG.07
'MIL08'n YEMP_MILFLAG.08
'MIL09'n YEMP_MILFLAG.09
SAS Code for Variable Creation
/*When more than one current job is reported, the CPS/main job is defined as the job at which the person usually works the most hours. If the person works the same number of hours on more than one current job, then the CPS/main job is the one at which the person has been employed the longest (this does not take account of absences from the job. To calculate this, array the job uids, the current status, the number of hours worked, and the start dates.*/
/*array job identifiers (UID) by round*/
array UID [9] UID01 UID02 UID03 UID04 UID05 UID06 UID07 UID08 UID09;
/*array current status (CUR) by round*/
array CUR [9] CUR01 CUR02 CUR03 CUR04 CUR05 CUR06 CUR07 CUR08 CUR09;
/*array hours (HRS) by round*/
array HRS [9] HRS01 HRS02 HRS03 HRS04 HRS05 HRS06 HRS07 HRS08 HRS09;
*array military (MIL) by round;
array MIL [9] MIL01 MIL02 MIL03 MIL04 MIL05 MIL06 MIL07 MIL08 MIL09;
/*array start day (STDAY) by round*/
array STDAY [9] STD01 STD02 STD03 STD04 STD05 STD06 STD07 STD08 STD09;
/*array start month (STM) by round*/
array STM [9] STM01 STM02 STM03 STM04 STM05 STM06 STM07 STM08 STM09;
/*array start year (STY) by round*/
array STY [9] STY01 STY02 STY03 STY04 STY05 STY06 STY07 STY08 STY09;
/*array start date (BDTE) by round*/
array BDTE [9] BDTE01 BDTE02 BDTE03 BDTE04 BDTE05 BDTE06 BDTE07 BDTE08 BDTE09;
/*set any missing start days to the first day of the month*/
do i=1 to 9;
if stday(i)<0 and stday(i)>-4 then stday(i)=1;
end;
/*calculate the combined start date for all dates with valid day, month year - for all others, set the variable to an invalid skip (-3)*/
do i=1 to 9;
if stm(i)>0 and sty(i)>0 then do;
BDTE(i)=mdy(stm(i), stday(i), sty(i));
end;
else if stm(i) in (-1, -2, -3) or sty(i) in (-1, -2, -3) then do;
BDTE(i)=-3;
begflg=1;
end;
end;
/*array end day (END) by round*/
array END [9] END01 END02 END03 END04 END05 END06 END07 END08 END09;
/*array end month (ENM) by round*/
array ENM [9] ENM01 ENM02 ENM03 ENM04 ENM05 ENM06 ENM07 ENM08 ENM09;
/*array end year (ENY) by round*/
array ENY [9] ENY01 ENY02 ENY03 ENY04 ENY05 ENY06 ENY07 ENY08 ENY09;
*array end date (EDTE) by round;
array EDTE [9] EDTE01 EDTE02 EDTE03 EDTE04 EDTE05 EDTE06 EDTE07 EDTE08 EDTE09;
do i=1 to 9;
if end(i)<0 and end(i)>-4 then end(i)=28;
end;
/*fill in the end-job-months where the corresponding reported year is less than reported year in a job with a good date*/
do i=2 to 9;
if enm(i)>-4 and enm(i)<0 and eny(i)>0 and eny(i)<eny(i-1) then do;
enm(i)=12;
bmgy=i;
end;
end;
/*set to calculated dates to missing when the month or year is missing*/
do i=1 to 9;
/*09*/
if enm(i)>0 and eny(i)>0 then do;
EDTE(i)=mdy(ENM(i), END(i), ENY(i));
end;
else if enm(i) in (-1, -2, -3) or eny(i) in (-1, -2, -3) then do;
edte(i)=-3;
dteflg=1;
end;
end;
/*determine the main job*/
/*first determine whether the respondent is interviewed in the round and held any civilian job - if not set the variable to -4 (or -5 if not interviewed)*/
if stm01=-5 then cps10=-5;
if stm01=-4 and stm02=-4 then cps10=-4;
/*define military jobs and set to missing associated values*/
do i=1 to 9;
if MIL(i)=1 then do;
EDTE(i)=.;
HRS(i)=.;
UID(i)=.;
CUR(i)=.;
end;
end;
/*count the total number of civilian jobs*/
uidcnt=0;
do i=1 to 9;
if uid(i)>0 then uidcnt=uidcnt+1;
end;
do i=1 to 9;
if uidcnt=1 and uid(i)>0 and edte(i)=-3 then cps=i;
end;
do i=1 to 9;
if cps10=. and edte(i) ne . and edte(i) ne -3 then dtemax=max(edte01, edte02, edte03, edte04, edte05, edte06, edte07, edte08, edte09);
end;
/*this is taking out the people with bad end months and years - need to figure it out next*/
do i=1 to 9;
if edte(i)=-3 then dtemax=.;
end;
count=0;
do i=1 to 9;
if dtemax ne . and dtemax=edte(i) then count=count+1;
end;
do i=1 to 9;
if cps10=. and count=1 and dtemax ne . and dtemax=edte(i) and dtemax ne . then cps10=i;
end;
do i=1 to 9;
if cps10=. and dtemax=. and mil01=1 and mil(i) ne 0 then cps10=-4;
end;
/*check the count of current jobs against the total jobs - if only 1 current job, then choose that for the main job*/
curcnt=0;
do i=1 to 9;
if cps10=. and cur(i)=1 then curcnt=curcnt+1;
end;
do i=1 to 9;
if cps10=. and curcnt=1 and cur(i)=1 then do;
cps10=i;
curflg=1;
end;
end;
/*for multiple jobs, determine the job with more hours if the dates are the same*/
/*first set to missing any hours for jobs no longer considered*/
do i=1 to 9;
if cps10=. and dtemax ne . and edte(i)>0 and dtemax ne edte(i) then hrs(i)=.;
end;
do i=1 to 9;
if cps10=. and dtemax ne . and hrs(i)=-3 then cps10=-3;
end;
do i=1 to 9;
if cps10=. and dtemax ne . and hrs(i)>-1 and hrs(i) ne . and edte(i) ne -3 then hrselg=1;
end;
do i=1 to 9;
if hrselg=1 and hrs(i)>-1 then hrsmax=max(hrs01, hrs02, hrs03, hrs04, hrs05, hrs06, hrs07, hrs08, hrs09);
end;
hrscnt=0;
do i=1 to 9;
if hrsmax ne . and hrsmax=hrs(i) then hrscnt=hrscnt+1;
end;
do i=1 to 9;
if cps10=. and hrscnt=1 and hrsmax=hrs(i) and hrsmax ne . then cps10=i;
end;
/*for multiple jobs, determine the job with the earlier start date if hours and end dates are the same*/
do i=1 to 9;
if cps10=. and hrsmax ne . and hrselg=1 and hrsmax ne hrs(i) then bdte(i)=.;
end;
do i=1 to 9;
if cps10=. and bdte(i) ne . and hrselg=1 and bdte(i)>0 and hrsmax=hrs(i) then dtemin=min(bdte01, bdte02, bdte03, bdte04, bdte05, bdte06, bdte07, bdte08, bdte09);
end;
/*this is taking out the people with bad beginning months and years - need to figure it out next*/
do i=1 to 9;
if bdte(i)=-3 then dtemin=.;
end;
begcnt=0;
do i=1 to 9;
if dtemin ne . and dtemin=bdte(i) then begcnt=begcnt+1;
end;
do i=1 to 9;
if cps10=. and begcnt=1 and dtemin ne . and dtemin=bdte(i) and dtemin ne . then cps10=i;
end;
/*if more than one job has the same end date, hours, and beginning date, then just choose the first on the roster*/
do i=1 to 9;
if cps10=. and dtemin ne bdte(i) and dtemin ne . then bdte(i)=.;
end;
do i=1 to 8;
if cps10=. and bdte(i)=bdte(i+1) and dtemin=bdte(i) and bdte(i) ne . then cps10=i;
end;
/*assign invalid skips to respondents without valid job information*/
if cps10=. then cps10=-3;
endsas;
Cohorts
- NLSY97
- Topical Guide to the Data
- Asterisk Tables
- I. Employment, Unemployment, and Job Search (age restrictions as of interview date)
- II. Schooling (age restrictions as of 12/31/96)
- III. Training (age restrictions as of interview date)
- IV. Income, Assets, and Program Participation
- V. Family Formation (age restrictions as of end of previous calendar year--12/31/96 in rd 1, 12/31/97 in rd 2, and so on)
- VI. Family Background (age restrictions as of 12/31/1996)
- VII. Expectations
- VIII. Attitudes, Behaviors, and Time Use
- IX. Health (age restrictions as of 12/31/96)
- X. Political Participation
- XI. Environmental Variables (in main data set)
- Education
- Employment
- Household, Geography & Contextual Variables
- Family Background
- Marital History, Childcare & Fertility
- Income
- Health
- Attitudes
- Crime & Substance Use
- Asterisk Tables
- Intro to the Sample
- Using & Understanding the Data
- Other Documentation
- Get Data
- Topical Guide to the Data
- NLSY79
- Topical Guide to the Data
- Asterisk Tables
- Education
- Employment
- Employment: An Introduction
- Work Experience
- Jobs & Employers
- Class of Worker
- Discrimination
- Fringe Benefits
- Industries
- Job Characteristics Index
- Job Satisfaction
- Job Search
- Labor Force Status
- Military
- Occupations
- Time & Tenure with Employers
- Wages
- Work History Data
- Employer History Roster
- Business Ownership
- Retirement
- Household, Geography & Contextual Variables
- Family Background
- Marital History, Childcare & Fertility
- Income
- Health
- Attitudes
- Crime & Substance Use
- Intro to the Sample
- Using & Understanding the Data
- Other Documentation
- Codebook Supplement
- NLSY79 Attachment 3: Industrial and Occupational Classification Codes
- NLSY79 Attachment 4: Fields of Study in College
- NLSY79 Attachment 5: Index of Labor Unions and Employee Associations
- NLSY79 Attachment 6: Other Kinds of Training Codes
- NLSY79 Attachment 7: Other Certificate Codes
- NLSY79 Attachment 8: Health Codes
- NLSY79 Attachment 100: Geographic Regions
- NLSY79 Attachment 101: Country Codes
- NLSY79 Attachment 102: Federal Information Processing Standards (FIPS)
- NLSY79 Attachment 103: Religion Codes
- NLSY79 Attachment 106: Profiles of American Youth (ASVAB Data/AFQT Scores)
- NLSY79 Appendix 1: Employment Status Recode Variables (1979-1998 and 2006)
- NLSY79 Appendix 2: Total Net Family Income Variable Creation (1979-2014)
- NLSY79 Appendix 3: Job Satisfaction Measures
- NLSY79 Appendix 4: Job Characteristics Index 1979-1982
- NLSY79 Appendix 5: Supplemental Fertility and Relationship Variables
- NLSY79 Appendix 6: Urban-Rural and SMSA-Central City Variables
- NLSY79 Appendix 7: Unemployment Rate
- NLSY79 Appendix 8: Highest Grade Completed & Enrollment Status Variable Creation
- NLSY79 Appendix 9: Linking Employers Through Survey Years
- NLSY79 Appendix 11: Round 12 (1990) Survey Administration Methods
- NLSY79 Appendix 12: Most Important Job Learning Activities (1993-94)
- NLSY79 Appendix 13: Intro to CAPI Questionnaires and Codebooks
- NLSY79 Appendix 14: Instrument Rosters
- NLSY79 Appendix 15: Recipiency Event Histories
- NLSY79 Appendix 16: 1994 Recall Experiment
- NLSY79 Appendix 17: Interviewer Characteristics Data
- NLSY79 Appendix 18: Work History Data
- NLSY79 Appendix 19: SF-12 Health Scale Scoring
- NLSY79 Appendix 20: Round 20 (2002) Early Bird and Income Recall Experiments
- NLSY79 Appendix 21: Attitudinal Scales
- NLSY79 Appendix 22: Migration Distance Variables for Respondent Locations
- NLSY79 Appendix 23: Revised Asset and Debt Variables and Computed Net Worth Variables
- NLSY79 Appendix 24: Reanalysis of the 1980 AFQT Data from the NLSY79
- NLSY79 Appendix 25: Center for Epidemiologic Studies Depression (CES-D) Scale
- NLSY79 Appendix 26: Non-Response to Financial Questions and Entry Points
- NLSY79 Appendix 27: IRT Item Parameter Estimates, Scores and Standard Errors
- NLSY79 Appendix 28: NLSY79 Employer History Roster
- Geocode Codebook Supplement
- Appendix 7: Unemployment Rates
- Appendix 10: Geocode Documentation
- Attachment 100: Geographic Regions
- Attachment 101: Country Codes
- Attachment 102: State FIPS Codes
- Attachment 104, Part A: 1981 Standard Metropolitan Statistical Areas (SMSAs)
- Attachment 104, Part B: 1983 Metropolitan Statistical Areas (MSAs)
- Attachment 104, Part C: 1983 Consolidated MSAs and Associated Primary MSAs (CMSAs and PMSAs)
- Attachment 104, Part D: 1983 PMSAs and Associated CMSAs
- Attachment 104, Part E: 1988 MSAs, CMSAs, and Associated PMSAs
- Attachment 104, Part F: 2004 MSAs, CMSAs, and Associated PMSAs
- Attachment 104, Part G: 2006 Core-Based Statistical Areas (CBSAs)
- Attachment 105: Addendum to FICE Codes
- Attachment 106: Codebook Pages for Geocode and Zipcode Variables
- Questionnaires
- Tutorials
- Errata
- Technical Sampling Report
- School & Transcript Surveys Documentation
- Codebook Supplement
- Get Data
- Topical Guide to the Data
- NLSY79 Child/YA
- Topical Guide to the Data
- Intro to the Sample
- Using & Understanding the Data
- Other Documentation
- Codebook Supplement
- Appendix A: HOME-SF Scales (NLSY79 Child)
- Appendix B: Composition of the Temperament Scales (NLSY79 Child)
- Appendix C: Motor & Social Development (NLSY79 Child)
- Appendix D: Behavior Problems Index (NLSY79 Child)
- Appendix D, Part 1: Composition of the BPI subscales
- Appendix D, Part 2a: BPI Anxious/Depressed Subscale
- Appendix D, Part 2b: BPI Antisocial Subscale
- Appendix D, Part 2c: BPI Dependent Subscale
- Appendix D, Part 2d: BPI Headstrong Subscale
- Appendix D, Part 2e: BPI Hyperactive Subscale
- Appendix D, Part 2f: BPI Peer Conflicts/Withdrawn Subscale
- Appendix D, Part 2g: BPI Full Scale
- Appendix D, Part 3a: BPI Internalizing Subscale
- Appendix D, Part 3b: BPI Externalizing Subscale
- Appendix D, Part 3c: BPI Total Scores
- Appendix E: Sample SPSSx Program for Merging NLSY79 Child/YA & Mother Files
- Appendix F: Sample SAS Program for Merging NLSY79 Child/YA & Mother Files
- Appendix G: NLSY79 Child Assessment Scores, Reference Numbers (2010-2014)
- Appendix H: Identification Codes in the Child and Young Adult Database
- Attachment 100: Codebook Pages for Young Adult Geocode Data
- Questionnaires
- Errata
- Errata for 2014 Child/Young Adult Release
- Data Addition: New Work and School Status Variables Created
- Errata for 2012 Child/Young Adult Release
- Errata for 2010 Child/Young Adult Release
- Errata for 2008 Child/Young Adult Release
- Errata for 2006 Child/Young Adult Release
- Errata for 2004 Child/Young Adult Release
- Errata for 2002 Child/Young Adult Release
- Errata for 2000 Child/Young Adult Release
- Errata for NLSY79 Child Interview Dates 1986-1992
- Research/Technical Reports
- Codebook Supplement
- Get Data
- NLS Mature and Young Women
- NLS Older and Young Men