- Introduction
- Roster construction
- Employer order
- Roster content
- Roster structure
- Linking to non-roster employer variables
- User notes
The Employer History Roster (EHR) has been available to public data users since 2013. This sizeable set of variables incorporates a substantial amount of information about each employer into a single record for each. See Appendix 13: Development of Questionnaires and Codebooks for a description of rosters as a data structure.
Programs that created the EHR can be accessed at the bottom of this page.
Introduction
Throughout NLSY79 history, it has been a common exercise for users to track employer records through multiple survey years. The traditional means of linking job records is somewhat involved, requiring multiple steps and identification of job numbers in current, previous and subsequent survey years (See Appendix 9: Linking Employers Through Survey Years).
The EHR is intended to alleviate if not eliminate the burden of linking jobs for users. In the EHR, employer records through survey years have already been linked into a single continuous cumulative record for each employer ever reported by a respondent. The roster currently contains data for up to 67 employers (up to 67 records). This means that at least one respondent has reported 67 jobs over the course of the NLSY79's 30 survey rounds, spanning 44 years. Most respondents of course will have a much smaller number of jobs reported since 1979 and only a single respondent has reported 67 jobs.
While the EHR does not contain all information ever reported about each employer, it does contain a substantial amount of commonly used data items that are consistently found through the survey's history. Users can also more easily incorporate job-related data items that are not currently on the roster. Instructive examples of how the roster data can be used appear below. Variables that are part of the EHR are available through the NLS Investigator search and extraction tool. These variables can be found in Investigator by using the areas of interest that start with 'EMPLOYER HISTORY,' question names that start with 'EMPLOYERS_ALL' or reference numbers that start with 'E.' The variables in this roster are classified as 'XRND', meaning that they are not linked to any specific survey year (see the Glossary of NLS Terms for a full definition of XRND). Instead, they are updated each round with the most current cumulative data available.
Please note: Variables referenced in the following discussion are described in Table 1, which lists the contents of the Employer History Roster.
Roster construction
The process of constructing the historical EHR began by establishing preliminary linkages similar to that described in Appendix 9. Employers were tracked between current, previous and subsequent survey years using multiple employer numbers in each survey year. After preliminary matches were established, linkages and discrepancies were examined in detail, often using in-house data not available publicly. This might include items such as occupation and industry descriptions and interviewer comments made during the course of an interview, in conjunction with employer names. Examining these items could in some cases serve to clarify connections between jobs reported in various years. Consequently, at least some employer records built in the EHR may be of higher quality than those that can be established using publicly available data.
Employer order
Employers are listed on the EHR in chronological order by the earliest start date reported for a job. For instance:
- Employer #1 will be the job with the earliest start date ever reported for any job.
- Employer #4 will be the job with the 4th earliest start date. There will be three jobs with earlier start dates in the roster, numbered Employers #1, #2 and #3.
Please note that the order of an employer on the roster (from 1-67 possible) is based solely on the original start date (the earliest start date available) at the first report of that job. It is not based on the survey year in which the job was first reported. Consider the following example:
- A respondent has reported 3 jobs through the 1987 survey year. These jobs with original start dates ranging from 1978 to 1984, have the following pattern:
- Employer first reported 1979, original start date = Jan. 1978
- Employer first reported 1983, original start date = Nov. 1982
- Employer first reported 1987, original start date = Jan. 1987
During the 1988 interview, the respondent reports a 4th employer that s/he failed to report at an earlier interview with an original start date of March 1985. While this job will be numbered by the 'unique identification number' as a job reported in the 1988 survey year, its order on the roster will precede the job reported in 1987. Although the 1987 job was reported first, it actually started later. In this simple example, the order of employers on the roster would appear as:
- Employer #1: first reported 1979, original start date = Jan. 1978, unique id = 19790100
- Employer #2: first reported 1983, original start date = Nov. 1982, unique id = 19830100
- Employer #3: first reported 1988, original start date = Mar. 1985, unique id = 19880100
- Employer #4: first reported 1987, original start date = Jan. 1987, unique id = 19870100
These types of reporting irregularities along with possible isolated errors in recording and data entry errors are not common but are recurrent throughout the life of the survey. As many inconsistencies as possible were resolved in the construction of the EHR.
Roster content
The vast majority of variables currently included on the EHR are directly copied from responses collected during the survey or from data items already coded or created separately for the public release dataset. For example, start and stop dates, currently working status and class of worker are all responses collected during the interview. Occupation and industry variables are coded from responses collected during the interview. Start and stop weeks and array job numbers are variables created by the Work History programs (see Appendix 18: Work History Data).
Table 1 lists the contents of the Employer History Roster by area of interest and question name. The EHR currently contains data for up to 67 jobs ever reported.
EMPLOYER HISTORY | Question names | Description | Source | Variables included for: |
---|---|---|---|---|
JOB CHARACTERISTICS | EMPLOYERS_ALL_GOVJOB_[YEAR].[JOB#] | Was this job a government job? | Direct survey responses | Each job for each survey year through 1987 (a) |
EMPLOYERS_ALL_CPSJOB_[YEAR].[JOB#] | Was this job the CPS (current/most recent) job? | Direct survey responses | Each job for each survey year (a) | |
EMPLOYERS_ALL_UNION_[YEAR].[JOB#] | R covered by union or employee contract on the job? | Direct survey responses | Each job for each survey year (a) | |
EMPLOYERS_ALL_CURWK_[YEAR].[JOB#] | R currently working for employer at date of interview? | Direct survey responses | Each job for each survey year (a) | |
JOB EMPLOYER IDS | EMPLOYERS_ALL_NUM_ARRAY_[YEAR].[JOB#] | Number loaded into Work History Labor Force Status array | Created by Work History Programs | Each job for each survey year (a) |
EMPLOYERS_ALL_PREVID_[YEAR].[JOB#] | Job number of employer from previous interview | Direct survey responses | Each job for each survey year (a) | |
EMPLOYERS_ALL_ID_[YEAR].[JOB#] | ID number of job in survey year | Direct survey responses | Each job for each survey year (a) | |
EMPLOYERS_ALL_UID.[JOB#] (c) | Unique identification number for each job, consisting of survey year job first reported, appended with job number in that survey year * 100 (e.g. job #2 first reported in 1980 = 19800200) | Created for EHR | Each job (b) | |
JOB HOURS WORKED |
EMPLOYERS_ALL_HOURSDAY_[YEAR].[JOB#] User Note: These variables are not available for self-employed jobs. |
Hours per day usually worked at job | Direct survey responses | Each job for each survey year (a) |
EMPLOYERS_ALL_HOURSWEEK_[YEAR].[JOB#] | Hours per week usually worked at job | Direct survey responses | Each job for each survey year (a) | |
JOB INDUSTRY, OCCUPATION AND CLASS OF WORKER |
EMPLOYERS_ALL_IND_[YEAR].[JOB#] User note: The coding frame for these variables is different for survey years 1979-2000 and for 2002 through current data releases. The 1970 Census coding frame was used for variables through the 2000 survey year. The 2000 Census coding frame was applied in 2002 and subsequent survey years. |
Type of business or industry for employer | Coded from survey responses | Each job for each survey year (a) |
EMPLOYERS_ALL_OCC_[YEAR].[JOB#] User note: The coding frame for these variables is different for survey years 1979-2000 and for 2002 through current data releases. The 1970 Census coding frame was used for variables through the 2000 survey year. The 2000 Census coding frame was applied in 2002 and subsequent survey years. |
Occupation for employer | Coded from survey responses | Each job for each survey year (a) | |
EMPLOYERS_ALL_COW_[YEAR].[JOB#] User note: Researchers using these variables across multiple survey rounds should take careful note that the response categories changed in 1994. Categories are consistent from 1979-1993, and from 1994 through the current data release. |
Class of worker for employer | Coded from survey responses | Each job for each survey year (a) | |
JOB ORIGINAL STARTDATES AND MOST RECENT STOPDATES | EMPLOYERS_ALL_STOPDATE_MOST_RECENT.[JOB#]~[D/M/Y] (d) | Most recent stopdates for employer | Created from survey responses for EHR | Each job (b) |
EMPLOYERS_ALL_STARTDATE_ORIGINAL.[JOB#]~[D/M/Y] (c) | Original startdate for employer | Created from survey responses for EHR | Each job (b) | |
JOB PAYRATES AND TIME UNITS | EMPLOYERS_ALL_TIMERATE_[YEAR].[JOB#] | Time unit for rate of pay | Survey responses | Each job for each survey year (a) |
EMPLOYERS_ALL_PAYRATE_[YEAR].[JOB#] | Payrate for employer | Coded from survey responses | Each job for each survey year (a) | |
EMPLOYERS_ALL_HRLY_WAGE_[YEAR].[JOB#] | Hourly rate of pay for employer | Coded from survey responses | Each job for each survey year (a) | |
JOB START DATES | EMPLOYERS_ALL_STARTDATE_[YEAR].[JOB#]~[D/M/Y] | Startdate for employer | Direct survey responses | Each job for each survey year (a) |
JOB START WEEKS | EMPLOYERS_ALL_STARTWEEK_[YEAR].[JOB#] | Week number of start date for job | Created by Work History Programs | Each job for each survey year (a) |
JOB STOP DATES | EMPLOYERS_ALL_STOPDATE_[YEAR].[JOB#]~[D/M/Y] | Stop date for employer | Direct survey responses | Each job for each survey year (a) |
JOB STOP WEEKS | EMPLOYERS_ALL_STOPWEEK_[YEAR].[JOB#] | Week number of stop date for job | Created by Work History Programs | Each job for each survey year (a) |
JOB TENURE AND PRETENURE | EMPLOYERS_ALL_PRETEN_[YEAR].[JOB#] | Months worked for employer before date of last interview | Direct survey responses | Each job for each survey year (a) |
EMPLOYERS_ALL_TENURE_[YEAR].[JOB#] | Total weeks tenure with employer | Created by Work History Programs | Each job for each survey year (a) | |
EMPLOYERS_ALL_PAST_[YEAR].[JOB#] | R work for employer before date of last interview? | Direct survey responses | Each job for each survey year (a) | |
JOB WHY LEFT |
EMPLOYERS_ALL_WHYLEFT_[YEAR].[JOB#] User note: Researchers using these variables across multiple survey rounds should take careful note that the response categories and assignments of response codes have changed a number of times over the 30 survey rounds. For example, response code "2" may mean 'Discharged or fired' in one survey year and 'Plant closed' in another. Likewise, 'Layoff' is grouped with 'Plant closed, or end of temporary or seasonal job' in some survey years and is listed as a separate response category in others. |
Reason left job | Direct survey responses | Each job for each survey year (a) |
EMPLOYERS_ALL_WHYLEFT_MOST_RECENT.[JOB#] User note: This variable contains the most recent reason why the respondent left the job, even if the respondent has since returned and is currently working at that job. Also please note: Response categories for these variables incorporate all possible responses across survey years. For instance, 'Layoff' is listed separately from 'Layoff, plant closed, or end of temporary or seasonal job', because both of these responses categories existed in different survey years. |
Reason left job most recent time left | Created from survey responses for EHR | Each job (b) | |
EMPLOYERS_ALL_WHYLEFT_MOST_RECENT_COL.[JOB#] User note: Response categories for these variables collapses all possible categories in the EMPLOYERS_ALL_WHYLEFT_MOST_RECENT.[JOB#] variables into 6 broad categories. This variable contains the most recent reason why the respondent left the job, even if the respondent has since returned and is currently working at that job. |
Reason left job most recent time left - collapsed | Created from survey responses for EHR | Each job (b) | |
WITHIN JOB GAPS REASON NOT WORKING | EMPLOYERS_ALL_WHYNOWK_[YEAR].[JOB#].[GAP#] | Reason not working for within job gap | Direct survey responses | Each job for each gap for each survey year (e) |
WITHIN JOB GAPS START DATES | EMPLOYERS_ALL_PERSTART_[YEAR].[JOB#].[GAP#] | Week number of start dates for within job gap | Created by Work History Programs | Each job for each gap for each survey year (e) |
WITHIN JOB GAPS STOP DATES | EMPLOYERS_ALL_PERSTOP_[YEAR].[JOB#].[GAP#] | Week number of stop dates for within job gap | Created by Work History Programs | Each job for each gap for each survey year (e) |
WITHIN JOB GAPS WEEKS LOOKING | EMPLOYERS_ALL_LOOK_[YEAR].[JOB#].[GAP#] | Any weeks looking for work during within job gap | Direct survey responses | Each job for each gap for each survey year (e) |
WITHIN JOB GAPS WEEKS NOT WORKING | EMPLOYERS_ALL_NOTLOOK_[YEAR].[JOB#].[GAP#] | Number of weeks not looking for work during within job gap | Direct survey responses | Each job for each gap for each survey year (e) |
WITHIN JOB GAPS WEEKS NOT WORKING | EMPLOYERS_ALL_WKSNOTWK_[YEAR].[JOB#] | Any weeks not working for employer | Direct survey responses | Each job for each gap for each survey year (e) |
- Variables created for 'each job for each survey year' will have one variable picked up for each survey year for each job the respondent has reported. For instance, the EMPLOYERS_ALL_CURWK_[YEAR].[JOB#] set of variables will include the 'currently working' status for each job reported, in each survey year that a job was active. If a respondent reports employer #1, spanning from 1980-1989, a variable will be present for employer #1 for each survey year (EMPLOYERS_ALL_CURWK_1980.01, EMPLOYERS_ALL_CURWK_1981.01, EMPLOYERS_ALL_CURWK_1982.01...EMPLOYERS_ALL_CURWK_1989.01). If the respondent reports employer #2, spanning from 1985-1990, another set of those variables would be available for employer #2 for each of those survey years (EMPLOYERS_ALL_CURWK_1985.02, EMPLOYERS_ALL_CURWK_1986.02, etc.). Users should note that the EMPLOYERS_ALL_GOVJOB_[YEAR].[JOB#] set of variables only exist through 1987, when that question was dropped from the survey.
- Variables created for 'each job' will have one variable per employer. EMPLOYERS_ALL_UID.[JOB#], EMPLOYERS_ALL_STARTDATE_ORIGINAL.[JOB#]~[D/M/Y] and EMPLOYERS_ALL_STOPDATE_MOST_RECENT.[JOB#]~[D/M/Y] are all examples of variables that appear only once for each job. Each employer has only one unique identification number, one original start date and one most recent stop date. These variables will be present for each reported employer, regardless of the survey years in which they were reported.
- Once assigned, the unique id and original start date for an employer will not change except under two conditions: 1) an error is found in the reporting record that necessitates either a correction to an original start date or a reordering of employers, and/or 2) more employers are recovered from archives that necessitate a chronological reordering of employers for a respondent.
- The most recent stop date for an employer will be updated with each successive interview during which that employer is reported, until the respondent leaves the employer and does not return.
- Variables created for 'each job for each gap for each survey' are similar to the variables in group (b) above, but are present for up to 4 gaps reported within the tenure of each job. For example, if a respondent reports two gaps within the tenure for employer #2 and one gap within the tenure for employer #3 in 1986, gap variables would be present for each employer for that survey year. EMPLOYERS_ALL_WHYNOWK_[YEAR].[JOB#].[GAP#] variables in that case would be EMPLOYERS_ALL_WHYNOWK_1986.02.01 and EMPLOYERS_ALL_WHYNOWK_1986.02.02 (gaps within tenure with employer #2), and EMPLOYERS_ALL_WHYNOWK_1986.03.01 (gap within tenure with employer #3).
Roster structure
The Employer History Roster is structured with a single 'record' for each employer. The information from survey year to survey year for the same employers has already been linked into this single record. This allows researchers to look at the record for an employer for the entire time the job was reported. Information for each specific job can be identified using the following search criteria:
- Question Name (enter search term) + starts with + 'EMPLOYERS_ALL'
- Word in Title (enter search term) + contains + 'JOB ##'
The NLS Investigator search captured in Figure 1 below will produce all variables on the roster pertaining to the first job a respondent ever reported, regardless of when that job was first reported. Some respondents may have reported their first job in 1979 while others may not have reported their first job until 1985.
- Select study = NLSY79
- Click the VARIABLE SEARCH tab
- Next, click the SEARCH sub-tab
- In the criteria section:
- Select QUESTION NAME (enter search term) from the first drop-down menu,
- select "starts with" in the second drop-down menu,
- type EMPLOYERS_ALL in the text box, and
- click ADD
- In the next row of criteria:
- Select WORD IN TITLE (enter search term) from the first drop-down menu,
- select "contains" in the second drop-down menu,
- type Job 01 in the text box, and
- Click DISPLAY VARIABLES
Each successive survey year presents the opportunity for a respondent to report additional employers. Consider a respondent with the reporting record depicted in Table 2:
Interview date | Order in EHR | Original start date | Most recent stop date | Unique ID | Employer information reported in survey years | Examples of variables present for each job |
---|---|---|---|---|---|---|
Feb. 1, 1979 | 4 | Mar. 1, 1978 | Feb. 2, 1980 | 19790100 | 1979, 1980 |
EMPLOYERS_ALL_UID.04, EMPLOYERS_ALL_STARTDATE_ORIGINAL.04~[D/M/Y], EMPLOYERS_ALL_MOST_RECENT_STOPDATE.04~[D/M/Y], EMPLOYERS_ALL_CURWK_1979.04, EMPLOYERS_ALL_ID_1979.04, EMPLOYERS_ALL_IND_1979.04, EMPLOYERS_ALL_OCC_1979.04, EMPLOYERS_ALL_CURWK_1980.04, EMPLOYERS_ALL_ID_1980.04, EMPLOYERS_ALL_IND_1980.04, EMPLOYERS_ALL_OCC_1980.04 |
3 | Feb. 15, 1978 | Dec. 15, 1979 | 19790200 | 1979, 1980 |
EMPLOYERS_ALL_UID.03, EMPLOYERS_ALL_STARTDATE_ORIGINAL.03~[D/M/Y], EMPLOYERS_ALL_MOST_RECENT_STOPDATE.03~[D/M/Y], EMPLOYERS_ALL_CURWK_1979.03, EMPLOYERS_ALL_ID_1979.03, EMPLOYERS_ALL_IND_1979.03, EMPLOYERS_ALL_OCC_1979.03, EMPLOYERS_ALL_CURWK_1980.03, EMPLOYERS_ALL_ID_1980.03, EMPLOYERS_ALL_IND_1980.03, EMPLOYERS_ALL_OCC_1980.03 |
|
1 | Feb. 15, 1977 | Jan. 15, 1979 | 19790300 | 1979 |
EMPLOYERS_ALL_UID.01, EMPLOYERS_ALL_STARTDATE_ORIGINAL.01~[D/M/Y], EMPLOYERS_ALL_MOST_RECENT_STOPDATE.01~[D/M/Y], EMPLOYERS_ALL_CURWK_1979.01, EMPLOYERS_ALL_ID_1979.01, EMPLOYERS_ALL_IND_1979.01, EMPLOYERS_ALL_OCC_1979.01 |
|
2 | Apr. 1, 1977 | Dec. 31, 1978 | 19790400 | 1979 |
EMPLOYERS_ALL_UID.02, EMPLOYERS_ALL_STARTDATE_ORIGINAL.02~[D/M/Y], EMPLOYERS_ALL_MOST_RECENT_STOPDATE.02~[D/M/Y], EMPLOYERS_ALL_CURWK_1979.02, EMPLOYERS_ALL_ID_1979.02, EMPLOYERS_ALL_IND_1979.02, EMPLOYERS_ALL_OCC_1979.02 |
|
Jan. 15, 1980 | 5 | Jun. 15, 1979 | Aug. 1, 1981 | 19800100 | 1980, 1981, 1982 |
EMPLOYERS_ALL_UID.05, EMPLOYERS_ALL_STARTDATE_ORIGINAL.05~[D/M/Y], EMPLOYERS_ALL_MOST_RECENT_STOPDATE.05~[D/M/Y], EMPLOYERS_ALL_CURWK_1980.05, EMPLOYERS_ALL_ID_1980.05, EMPLOYERS_ALL_IND_1980.05, EMPLOYERS_ALL_OCC_1980.05, EMPLOYERS_ALL_CURWK_1981.05, EMPLOYERS_ALL_ID_1981.05, EMPLOYERS_ALL_IND_1981.05, EMPLOYERS_ALL_OCC_1981.05, EMPLOYERS_ALL_CURWK_1982.05, EMPLOYERS_ALL_ID_1982.05, EMPLOYERS_ALL_IND_1982.05, EMPLOYERS_ALL_OCC_1982.05 |
6 | Sep. 15, 1979 | Jun. 1, 1980 | 19800200 | 1980, 1981 |
EMPLOYERS_ALL_UID.06, EMPLOYERS_ALL_STARTDATE_ORIGINAL.06~[D/M/Y], EMPLOYERS_ALL_MOST_RECENT_STOPDATE.06~[D/M/Y], EMPLOYERS_ALL_CURWK_1980.06, EMPLOYERS_ALL_ID_1980.06, EMPLOYERS_ALL_IND_1980.06, EMPLOYERS_ALL_OCC_1980.06, EMPLOYERS_ALL_CURWK_1981.06, EMPLOYERS_ALL_ID_1981.06, EMPLOYERS_ALL_IND_1981.06, EMPLOYERS_ALL_OCC_1981.06 |
|
Mar. 4, 1981 | 8 | Nov. 15, 1980 | Nov. 15, 1981 | 19810100 | 1981, 1982 |
EMPLOYERS_ALL_UID.08, EMPLOYERS_ALL_STARTDATE_ORIGINAL.08~[D/M/Y], EMPLOYERS_ALL_MOST_RECENT_STOPDATE.08~[D/M/Y], EMPLOYERS_ALL_CURWK_1981.08, EMPLOYERS_ALL_ID_1981.08, EMPLOYERS_ALL_IND_1981.08, EMPLOYERS_ALL_OCC_1981.08, EMPLOYERS_ALL_CURWK_1982.08, EMPLOYERS_ALL_ID_1982.08, EMPLOYERS_ALL_IND_1982.08, EMPLOYERS_ALL_OCC_1982.08 |
7 | Aug. 15, 1980 | Jun. 30, 1981 | 19810200 | 1981, 1982 |
EMPLOYERS_ALL_UID.07, EMPLOYERS_ALL_STARTDATE_ORIGINAL.07~[D/M/Y], EMPLOYERS_ALL_MOST_RECENT_STOPDATE.07~[D/M/Y], EMPLOYERS_ALL_CURWK_1981.07, EMPLOYERS_ALL_ID_1981.07, EMPLOYERS_ALL_IND_1981.07, EMPLOYERS_ALL_OCC_1981.07, EMPLOYERS_ALL_CURWK_1982.07, EMPLOYERS_ALL_ID_1982.07, EMPLOYERS_ALL_IND_1982.07, EMPLOYERS_ALL_OCC_1982.07 |
|
9 | Dec. 1, 1980 | Feb. 28, 1981 | 19810300 | 1981 |
EMPLOYERS_ALL_UID.09, EMPLOYERS_ALL_STARTDATE_ORIGINAL.09~[D/M/Y], EMPLOYERS_ALL_MOST_RECENT_STOPDATE.09~[D/M/Y], EMPLOYERS_ALL_CURWK_1981.09, EMPLOYERS_ALL_ID_1981.09, EMPLOYERS_ALL_IND_1981.09, EMPLOYERS_ALL_OCC_1981.09 |
|
Feb. 2, 1982 | Please note: Jobs with unique ids 19800100, 19810100 and 19810200 would still be active during the period between the 1981 and 1982 interview and would therefore have information reported during the 1982 interview. |
In the example in Table 2, the respondent has reported four employers at the initial 1979 interview, two additional employers at the 1980 interview, and three more new employers at the 1981 interview.
- The original start date, most recent stop date and unique id variables fall into the category of variables in Table 1 created for 'each job'. They will be present for all jobs reported by a respondent. If by 1990, the respondent has reported 13 jobs, 13 original start dates, 13 original stop dates and 13 unique ids will be present in the EHR for that respondent.
- In the Table 2 example, those variables falling into the other categories in Table 1 (variables present for each job (and each gap if applicable) for each survey year in which the job is reported), will be present only for the survey years listed in column 6 ('Employer information reported in survey years'), as those are the survey years in which information on the specific jobs would have been collected. Examples of the variables that would be present for the respondent and jobs listed in Table 2 are in the final column ('Examples of variables present for each job').
Variables for all jobs will not be present for all respondents. For example:
- A respondent reporting only 5 jobs through 2010 will have no data at all for jobs 6 through 67.
- Likewise, a respondent reporting their 28th employer starting in 1990 will have no data for that 28th employer picked up from survey years 1979-1989. In this instance, variables EMPLOYERS_ALL_UID.28, EMPLOYERS_ALL_STARTDATE_ORIGINAL.28~[D/M/Y], and EMPLOYERS_ALL_MOST_RECENT_STARTDATE.28~[D/M/Y] will be present but variables from the specific survey years 1979-89 (for instance, EMPLOYERS_ALL_OCC_1979.28, EMPLOYERS_ALL_OCC_1980.28, EMPLOYERS_ALL_OCC_1981.28, etc.) will not be present. Those variables will appear for 1990 when the job is first reported and be present for each subsequent survey year in which the job is reported. If this employer is reported in 1990, 1991 and 1992, EMPLOYERS_ALL_OCC_1990.28, EMPLOYERS_ALL_OCC_1991.28 and EMPLOYERS_ALL_OCC_1992.28 will be present for that respondent for job 28. Occupation codes for all other survey years prior and subsequent will be missing for that job for that respondent.
In addition, different series of variables may have missing items, depending on the reporting pattern. For instance:
- Users may find that there is data for jobs 1-33 and jobs 36-40 in 1994, but no data for jobs 34-35. Such a pattern would indicate that no respondents reported what would be their 34th and 35th job during the 1994 interview.
- There are also instances in which specific variable series have similar gaps. For instance, in a specific year, one might find industry and occupation codes for jobs 1-33 and 36-40, but again not for the 34th and 35th job. Such a pattern could result because no one reported their 34th and 35th job that year. Alternatively if several respondents reported a 34th/35th job that survey year, but those jobs did not meet the criteria (based on hours worked and length of time) that would have led to collection of industry and occupation descriptions, there would be no industry and occupation data from that survey year.
Linking to non-roster employer variables
While a large number of commonly used employer-related variables have been incorporated into the EHR, there are some variables in various survey years that have not. Users can link employer variables from a specific survey year that are not currently on the EHR to the cumulative record for an employer on the EHR by using the EMPLOYERS_ALL_ID_[YEAR].[JOB#] variables. These variables contain the identification number of a job in a specific survey year in which it was reported. The following paragraphs describe several examples of linking scenarios.
Imagine that a researcher wants to link data on promotions asked in 1989 to the cumulative employer record found in the EHR. Using the EMPLOYERS_ALL_ID_1989.[JOB#] variables, one can link the promotions data for the correct employer in 1989 to the cumulative employer record in the EHR. To accomplish this, the value of EMPLOYERS_ALL_ID_1989.[JOB#] would be checked for each employer on the EHR. If that value is '1,' the promotion variables for job #1 in 1989 would be linked. If the value of EMPLOYERS_ALL_UID_1989.[JOB#] is '2,' promotion variables for job #2 in 1989 would be linked, and so on.
In another example, one might want to link the EHR cumulative employer record with the information on the respondent's employee status (regular, consultant, contractor, temp worker) asked in 1994, 1996 and 1998. One would again use the EMPLOYERS_ALL_ID_1994.[JOB#], EMPLOYERS_ALL_ID_1996.[JOB#] and EMPLOYERS_ALL_ID_1998.[JOB#] variables in the same way described above to link to the appropriate employee status variables in each year. If the value of EMPLOYERS_ALL_ID_1994.24 is '1' then the employee status variables for employer #1 in 1994 would be linked to the cumulative record for job #24 on the EHR. If the value of EMPLOYERS_ALL_ID_1994.30 is '1' then those variables would be linked to the cumulative record for job #30 on the EHR. Following a similar procedure, the employee status variables for 1996 and 1998 could be linked to the appropriate cumulative job record on the EHR.
In addition, it is now possible to identify which cumulative job records on the EHR link to specific job numbers on the Work History Labor Force Status and Dual Jobs arrays. The EHR includes a set of variables called EMPLOYERS_ALL_NUM_ARRAY_[YEAR].[JOB#]. These variables contain the job number assigned by the Work History programs to each job for each survey year. The job number assigned by the Work History programs consists of the survey round and the number of the job for that survey year. So for instance, the 2nd job reported in 1993 (round 15 of the survey) would appear as job #1502 on the Labor Force Status and/or Dual Job arrays. If this same job was reported as job #1 in 1994 (round 16 of the survey), it would appear as job #1601 in the Labor Force Status array. The EMPLOYERS_ALL_NUM_ARRAY_[YEAR].[JOB#] variables allow users to identify and track a specific employer through the Work History job arrays more easily. For instance, if a user wants additional information on the first job a respondent reported after a gap, and the Work History array job number is 1701, one would want to identify which of the employers in the EHR (1-59) contains 1701 in the EMPLOYERS_ALL_NUM_ARRAY_1996.[JOB#] variable. Establishing this link to the EHR then provides an expanded series of variables depicting the entire history of the employer.
User notes
The Employer History Roster was made available after a considerable effort and was a long time in the making. Improvements will continue to be made as time allows. Some possible areas of improvement and expansion are discussed below:
Each survey year there are a small number of cases that report more than five employers. Prior to 1993, jobs 6+ were provided and stored on separate media. With the many technological transformations that have taken place in the past two decades, much of the information on this small set of jobs in each older survey year has become very difficult to recover from original sources, and is generally not included in the EHR. Reporting of more than five jobs per survey year is not common.
As mentioned earlier, the EHR includes a great deal, but not all, information collected on employers in each survey. For instance, some information on employee status (regular, temp worker, contractor, etc.), starting wages and hours of a job, fringe benefits applying to a job, etc. have been collected in various survey years but are not included on the EHR. Users can access this additional data by linking to individual Employer Supplements in the appropriate survey years.
Employer History Roster programs
Click a topic below to view programming code. Note: ## index reference variables for employers 1-67 in the Employer History Roster.
- Variable names in programs and NLSY79 data releases
- Linkjobs79_22
- Endjob22
- Stopdate22_final
- Employers_roster_7922_job
- Employers_roster_22_uid_name_stadate
- Employers_roster_22_id
- Employers_roster_22_others
- Employers_roster_22_stodate_whyleft
- Employers_roster_22_stdate_stweek
- Employers_roster_22_wksnotworked
Variable names in programs and NLSY79 data releases
/****************************** Variables Used ******************************/ /**Variable Names in program Variable Names in data release**/ UID_## (1-67) EMPLOYERS_ALL_UID.## (1-67) STAD_ORI_## (1-67) EMPLOYERS_ALL_STARTDATE_ORIGINAL.##~D (1-67) STAM_ORI_## (1-67) EMPLOYERS_ALL_STARTDATE_ORIGINAL.##~M (1-67) STAY_ORI_## (1-67) EMPLOYERS_ALL_STARTDATE_ORIGINAL.##~Y (1-67) STOD_FIN_## (1-67) EMPLOYERS_ALL_STOPDATE_MOST_RECENT.##~D (1-67) STOM_FIN_## (1-67) EMPLOYERS_ALL_STOPDATE_MOST_RECENT.##~M (1-67) STOY_FIN_## (1-67) EMPLOYERS_ALL_STOPDATE_MOST_RECENT.##~Y (1-67) REASONLEFT_## (1-67) EMPLOYERS_ALL_WHYLEFT_MOST_RECENT.## (1-67) REASONLEFTC_## (1-67) EMPLOYERS_ALL_WHYLEFT_MOST_RECENT_COL.## (1-67) ID_2022_## (1-67) EMPLOYERS_ALL_ID_2022.## (1-67) STAD_2022_## (1-67) EMPLOYERS_ALL_STADATE_2022.##~D (1-67) STAM_2022_## (1-67) EMPLOYERS_ALL_STADATE_2022.##~M (1-67) STAY_2022_## (1-67) EMPLOYERS_ALL_STADATE_2022.##~Y (1-67) STOD_2022_## (1-67) EMPLOYERS_ALL_STOPDATE_2022.##~D (1-67) STOM_2022_## (1-67) EMPLOYERS_ALL_STOPDATE_2022.##~M (1-67) STOY_2022_## (1-67) EMPLOYERS_ALL_STOPDATE_2022.##~Y (1-67) STAWK_2022_## (1-67) EMPLOYERS_ALL_STARTWEEK_2022.## (1-67) STOWK_2022_## (1-67) EMPLOYERS_ALL_STOPWEEK_2022.## (1-67) COW_2022_## (1-67) EMPLOYERS_ALL_COW_2022.## (1-67) CPSJOB_2022_## (1-67) EMPLOYERS_ALL_CPSJOB_2022.## (1-67) CURWK_2022_## (1-67) EMPLOYERS_ALL_CURWK_2022.## (1-67) HRP_2022_## (1-67) EMPLOYERS_ALL_HRLY_WAGE_2022.## (1-67) HRSDAY_2022_## (1-67) EMPLOYERS_ALL_HOURSDAY_2022.## (1-67) HRSWK_2022_## (1-67) EMPLOYERS_ALL_HOURSWEEK_2022.## (1-67) IND_2022_## (1-67) EMPLOYERS_ALL_IND_2022.## (1-67) JOBNUM_A_2022_## (1-67) EMPLOYERS_ALL_NUM_ARRAY_2022.## (1-67) MOSLI_2022_## (1-67) EMPLOYERS_ALL_PRETEN_2022.## (1-67) OCC_2022_## (1-67) EMPLOYERS_ALL_OCC_2022.## (1-67) PREVID_2022_## (1-67) EMPLOYERS_ALL_PREVID_2022.## (1-67) RELEFT_2022_## (1-67) EMPLOYERS_ALL_WHYLEFT_2022.## (1-67) ROP_2022_## (1-67) EMPLOYERS_ALL_PAYRATE_2022.## (1-67) TENURE_2022_## (1-67) EMPLOYERS_ALL_TENURE_2022.## (1-67) TUROP_2022_## (1-67) EMPLOYERS_ALL_TIMERATE_2022.## (1-67) UNI_2022_## (1-67) EMPLOYERS_ALL_UNION_2022.## (1-67) WBEFDI_2022_## (1-67) EMPLOYERS_ALL_PAST_2022.## (1-67) UNEM_2022_## (1-67) EMPLOYERS_ALL_WKSNOTWK_2022.## (1-67) STAWK_GAP1_2022_## (1-67) EMPLOYERS_ALL_PERSTAR_2022.##.01 (1-67) STAWK_GAP2_2022_## (1-67) EMPLOYERS_ALL_PERSTAR_2022.##.02 (1-67) STAWK_GAP3_2022_## (1-67) EMPLOYERS_ALL_PERSTAR_2022.##.03 (1-67) STAWK_GAP4_2022_## (1-67) EMPLOYERS_ALL_PERSTAR_2022.##.04 (1-67) STOWK_GAP1_2022_## (1-67) EMPLOYERS_ALL_PERSTOP_2022.##.01 (1-67) STOWK_GAP2_2022_## (1-67) EMPLOYERS_ALL_PERSTOP_2022.##.02 (1-67) STOWK_GAP3_2022_## (1-67) EMPLOYERS_ALL_PERSTOP_2022.##.03 (1-67) STOWK_GAP4_2022_## (1-67) EMPLOYERS_ALL_PERSTOP_2022.##.04 (1-67) REA_GAP1_2022_## (1-67) EMPLOYERS_ALL_WHYNOWK_2022.##.01 (1-67) REA_GAP2_2022_## (1-67) EMPLOYERS_ALL_WHYNOWK_2022.##.02 (1-67) REA_GAP3_2022_## (1-67) EMPLOYERS_ALL_WHYNOWK_2022.##.03 (1-67) REA_GAP4_2022_## (1-67) EMPLOYERS_ALL_WHYNOWK_2022.##.04 (1-67) LOOK_GAP1_2022_## (1-67) EMPLOYERS_ALL_LOOK_2022.##.01 (1-67) LOOK_GAP2_2022_## (1-67) EMPLOYERS_ALL_LOOK_2022.##.02 (1-67) LOOK_GAP3_2022_## (1-67) EMPLOYERS_ALL_LOOK_2022.##.03 (1-67) LOOK_GAP4_2022_## (1-67) EMPLOYERS_ALL_LOOK_2022.##.04 (1-67) NLOOK_GAP1_2022_## (1-67) EMPLOYERS_ALL_NOTLOOK_2022.##.01 (1-67) NLOOK_GAP2_2022_## (1-67) EMPLOYERS_ALL_NOTLOOK_2022.##.02 (1-67) NLOOK_GAP3_2022_## (1-67) EMPLOYERS_ALL_NOTLOOK_2022.##.03 (1-67) NLOOK_GAP4_2022_## (1-67) EMPLOYERS_ALL_NOTLOOK_2022.##.04 (1-67)
Linkjobs79_22
did2022=SYMBOL_CURDATE_D; dim2022=SYMBOL_CURDATE_M; diy2022=SYMBOL_CURDATE_Y; stay20221=EMPLOYER_STARTDATE_01_Y; stay20222=EMPLOYER_STARTDATE_02_Y; stay20223=EMPLOYER_STARTDATE_03_Y; stay20224=EMPLOYER_STARTDATE_04_Y; stay20225=EMPLOYER_STARTDATE_05_Y; stay20226=EMPLOYER_STARTDATE_06_Y; stay20227=EMPLOYER_STARTDATE_07_Y; stay20228=EMPLOYER_STARTDATE_08_Y; stay20229=EMPLOYER_STARTDATE_09_Y; stay202210=EMPLOYER_STARTDATE_10_Y; stay202211=EMPLOYER_STARTDATE_11_Y; stay202212=EMPLOYER_STARTDATE_12_Y; stay202213=EMPLOYER_STARTDATE_13_Y; stay202214=EMPLOYER_STARTDATE_14_Y; array stay (i) stay20221-stay20229 stay202210-stay202214; array curf (i) EMPLOYER_CURFLAG_01-EMPLOYER_CURFLAG_14; array curwk (i) curwk20221-curwk20229 curwk202210-curwk202214; totemp2022=0; do i=1 to 14; if stay~=. then do; totemp2022=totemp2022+1; if curf~=. then curwk=curf; else if curf=. then curwk=-3; end; else if stay=. then curwk=-4; end; array intyear (*) diy1979 diy1980 diy1981 diy1982 diy1983 diy1984 diy1985 diy1986 diy1987 diy1988 diy1989 diy1990 diy1991 diy1992 diy1993 diy1994 diy1996 diy1998 diy2000 diy2002 diy2004 diy2006 diy2008 diy2010 diy2012 diy2014 diy2016 diy2018 diy2020; array intrd (*) i1-i29 (1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1996 1998 2000 2002 2004 2006 2008 2010 2012 2014 2016 2018 2020); if dim2022=. then dim2022=-5; if did2022=. then did2022=-5; if diy2022=. then diy2022=-5; do i=dim(intyear) to 1 by -1; if (intyear(i)>0) then do; linty=intrd(i); leave; leave; end; end; array curwk22 curwk20221-curwk20229 curwk202210-curwk202014; do over prev; if diy2022=-5 then do; prev=-5; curwk22=-5; totemp2022=-5; end; end; array job2022 (j) job2022_job2022_1-job2022_job2022_14; array curwk2022 (j) curwk20221-curwk20229 curwk202210-curwk202214; array jobnum2022 (j) job_num_a2022_1-job_num_a2022_14; totemp_wh2022=0; do j=1 to 14; if curwk2022=-5 then do; job2022=-5; totemp_wh2022=-5; end; else if curwk2022>-4 then job2022=j; else job2022=-4; if jobnum2022>0 then totemp_wh2022=totemp_wh2022+1; end; array previd (14) previd2022_1-previd2022_14; array check (14) check1-check14; do h=1 to 14; do k=1 to 14; if h~=k then do; if previd(h)>0 and previd(h)=previd(k) then check(h)=k; end; end; end; %macro cc(linty); %do a=1 %to 19; %do i=1 %to 14; if previd2022_&i=&a then do; if linty=&linty and job&linty._job&linty._&a~=-4 then job&linty._job2022_&i=&a; if linty=&linty and job&linty._job&linty._&a=-4 then flag_jmatch2022_&i=1; end; else if previd2022_&i=-4 then do; job2020_job2022_&i=-4; end; else if previd2022_&i=-5 then do; job2020_job2022_&i=-5; flag_jmatch2022_&i=-5; end; if job&linty._job2022_&i=. then job&linty._job2022_&i=-4; if flag_jmatch2022_&i=. then flag_jmatch2022_&i=0; %end; %end; %mend cc; %macro lint; %do linty=2020 %to 1994 %by -2; %cc(&linty); %end; %do linty=1993 %to 1979 %by -1; %cc(&linty); %end; %mend lint; %lint; *Have to break it down since there is not enough memory to run from 1979 to 2018 because of the macros; *Link job# in 22 to job# in 1994-2018; %macro cc(a,linty); %if job&linty._job2022_&a>0 %then %do; %do yr=2018 %to 1994 %by -2; %if &linty>&yr %then %do; %do i=1 %to 14; %do j=1 %to 14; if job&linty._job2022_&a=&i and job&yr._job&linty._&i=&j then job&yr._job2022_&a=&j; else if job&linty._job2022_&a=-5 then job&yr._job2022_&a=-5; %end; %end; %end; %end; %end; %mend cc; %macro job(linty); %do a=1 %to 14; %cc(&a,&linty); %end; %mend job; %macro lint; %do linty=2020 %to 1996 %by -2; %job(&linty); %end; %mend lint; %lint; *Link job# in 22 to job# in 1987-1993; %macro cc(a,linty); %if job&linty._job2022_&a>0 %then %do; %do yr=1993 %to 1987 %by -1; %if &linty>&yr %then %do; %do i=1 %to 14; %do j=1 %to 14; if job&linty._job2022_&a=&i and job&yr._job&linty._&i=&j then job&yr._job2022_&a=&j; else if job&linty._job2022_&a=-5 then job&yr._job2022_&a=-5; %end; %end; %end; %end; %end; %mend cc; %macro job(linty); %do a=1 %to 14; %cc(&a,&linty); %end; %mend job; %macro lint; %do linty=2020 %to 1994 %by -2; %job(&linty); %end; %do linty=1993 %to 1988 %by -1; %job(&linty); %end; %mend lint; %lint; *Link job# in 22 to job# in 1983-1986; %macro cc(a,linty); %if job&linty._job2022_&a>0 %then %do; %do yr=1986 %to 1983 %by -1; %if &linty>&yr %then %do; %do i=1 %to 14; %do j=1 %to 14; if job&linty._job2022_&a=&i and job&yr._job&linty._&i=&j then job&yr._job2022_&a=&j; else if job&linty._job2022_&a=-5 then job&yr._job2022_&a=-5; %end; %end; %end; %end; %end; %mend cc; %macro job(linty); %do a=1 %to 14; %cc(&a,&linty); %end; %mend job; %macro lint; %do linty=2020 %to 1994 %by -2; %job(&linty); %end; %do linty=1993 %to 1984 %by -1; %job(&linty); %end; %mend lint; %lint; *Link job# in 22 to job# in 1979-1982; %macro cc(a,linty); %if job&linty._job2022_&a>0 %then %do; %do yr=1982 %to 1979 %by -1; %if &linty>&yr %then %do; %do i=1 %to 14; %do j=1 %to 14; if job&linty._job2022_&a=&i and job&yr._job&linty._&i=&j then job&yr._job2022_&a=&j; else if job&linty._job2022_&a=-5 then job&yr._job2022_&a=-5; %end; %end; %end; %end; %end; %mend cc; %macro job(linty); %do a=1 %to 14; %cc(&a,&linty); %end; %mend job; %macro lint; %do linty=2020 %to 1994 %by -2; %job(&linty); %end; %do linty=1993 %to 1980 %by -1; %job(&linty); %end; %mend lint; %lint; if diy2000>0 then diy2000=2000; if diy2002>0 then diy2002=2002; if diy2004>0 then diy2004=2004; if diy2006>0 then diy2006=2006; if diy2008>0 then diy2008=2008; if diy2010>0 then diy2010=2010; if diy2012>0 then diy2012=2012; if diy2014>0 then diy2014=2014; if diy2016>0 then diy2016=2016; if diy2018>0 then diy2018=2018; if diy2020>0 then diy2020=2020; if diy2022>0 then diy2022=2022; %macro cc(a); %do j=1994 %to 1979 %by -1; if (job&j._job2022_&a >0 and job&j._job2022_&a <=9) and diy&j>0 then do; staj1_job2022_&a=put(diy&j,4.)||'0'||put(job&j._job2022_&a,1.); end; else if job&j._job2022_&a >=10 and diy&j>0 then do; staj1_job2022_&a=put(diy&j,4.)||put(job&j._job2022_&a,2.); end; %end; %do j=2022 %to 1996 %by -2; if (job&j._job2022_&a >0 and job&j._job2022_&a <=9) and diy&j>0 then do; staj2_job2022_&a=put(diy&j,4.)||'0'||put(job&j._job2022_&a,1.); end; else if job&j._job2022_&a >=10 and diy&j>0 then do; staj2_job2022_&a=put(diy&j,4.)||put(job&j._job2022_&a,2.); end; %end; %mend cc; %macro job; %do a=1 %to 14; %cc(&a); %end; %mend job; %job; %macro dd(b); %do i=2 %to 1 %by -1; if staj&i._job2022_&b ~=' ' then do; staj_job2022_&b=staj&i._job2022_&b; end; %end; %mend dd; %macro jb; %do b=1 %to 14; %dd(&b); %end; %mend jb; %jb; array staj_job2022 (k) staj_job2022_1-staj_job2022_14; array job2022 (k) job2022_job2022_1-job2022_job2022_14; do k=1 to 14; if staj_job2022=. and job2022=-5 then staj_job2022=-5; else if staj_job2022=. then staj_job2022=-4; end; array staj2022 (*) staj_job2022_1-staj_job2022_14; do i=1 to 14; do j=1 to 14; if i~=j then do; if staj2022(i)>0 and staj2022(i)=staj2022(j) then check=1; end; end; end;
Endjob22
%macro id(yra,yrb); %do j=1 %to 19; %do i=1 %to 14; if job&yra._job&yrb._&j=&i then job&yrb._job&yra._&i=&j; else if job&yra._job&yrb._&j=-4 and job&yrb._job&yra._&i=. then job&yrb._job&yra._&i=-4; else if diy&yrb=-5 or diy&yra=-5 then job&yrb._job&yra._&i=-5; %end; %end; %mend id; %macro rd(yrb); %do yra = 1979 %to 1994; %id(&yra,&yrb); %end; %do yra = 1996 %to 2022 %by 2; %id(&yra,&yrb); %end; %mend rd; %macro rds; %do yrb = 1979 %to 1994; %rd(&yrb); %end; %do yrb = 1996 %to 2022 %by 2; %rd(&yrb); %end; %mend rds; %rds; if diy2000>0 then diy2000=2000; if diy2002>0 then diy2002=2002; if diy2004>0 then diy2004=2004; if diy2006>0 then diy2006=2006; if diy2008>0 then diy2008=2008; if diy2010>0 then diy2010=2010; if diy2012>0 then diy2012=2012; if diy2014>0 then diy2014=2014; if diy2016>0 then diy2016=2016; if diy2018>0 then diy2018=2018; if diy2020>0 then diy2020=2020; if diy2022>0 then diy2022=2022; %macro dd(a,yrb); %do j=1979 %to 1994 %by 1; if &j>=&yrb then do; if (job&j._job&yrb._&a>=1 and job&j._job&yrb._&a<=9) and diy&j>0 then do; endj1_job&yrb._&a=put(&j,4.)||'0'||put(job&j._job&yrb._&a,1.); end; else if job&j._job&yrb._&a>=10 and diy&j>0 then do; endj1_job&yrb._&a=put(&j,4.)||put(job&j._job&yrb._&a,2.); end; end; %end; %do j=1996 %to 2022 %by 2; if &j>=&yrb then do; if (job&j._job&yrb._&a>=1 and job&j._job&yrb._&a<=9) and diy&j>0 then do; endj2_job&yrb._&a=put(&j,4.)||'0'||put(job&j._job&yrb._&a,1.); end; else if job&j._job&yrb._&a>=10 and diy&j>0 then do; endj2_job&yrb._&a=put(&j,4.)||put(job&j._job&yrb._&a,2.); end; end; %end; %mend dd; %macro job(yrb); %do a=1 %to 19; %dd(&a,&yrb); %end; %mend job; %macro rds; %do yrb = 1979 %to 1994; %job(&yrb); %end; %do yrb = 1996 %to 2022 %by 2; %job(&yrb); %end; %mend rds; %rds; %macro ee(b,yrc); %do i=1 %to 2 %by 1; if endj&i._job&yrc._&b ~=' ' then do; endj_job&yrc._&b=endj&i._job&yrc._&b; end; %end; %mend ee; %macro jb(yrc); %do b=1 %to 19; %ee(&b,&yrc); %end; %mend jb; %macro rd; %do yrc = 1979 %to 1994; %jb(&yrc); %end; %do yrc = 1996 %to 2022 %by 2; %jb(&yrc); %end; %mend rd; %rd;
Stopdate22_final
%macro id(a,yra,yrb); %do i=1 %to 9; if endj_job&yra._&a=put((&yrb.0&i),6.) then do; stod_final&yra._&a=stod&yrb._&i; stom_final&yra._&a=stom&yrb._&i; stoy_final&yra._&a=stoy&yrb._&i; end; %end; %do i=10 %to 14;*14 jobs in 2022; if endj_job&yra._&a=put((&yrb&i),6.) then do; stod_final&yra._&a=stod&yrb._&i; stom_final&yra._&a=stom&yrb._&i; stoy_final&yra._&a=stoy&yrb._&i; end; %end; %mend id; %macro jb(yra,yrb); %do a=1 %to 19; %id(&a,&yra,&yrb); %end; %mend jb; %macro rd(yrb); %do yra = 1979 %to 1994; %jb(&yra,&yrb); %end; %do yra = 1996 %to 2022 %by 2; %jb(&yra,&yrb); %end; %mend rd; %macro rds; %do yrb = 2022 %to 2022; %rd(&yrb); %end; %mend rds; %rds;
Employers_roster_7922_job
array staj (236) staj_job1979_1-staj_job1979_5 staj_job1980_1-staj_job1980_5 staj_job1981_1-staj_job1981_5 staj_job1982_1-staj_job1982_5
staj_job1983_1-staj_job1983_5 staj_job1984_1-staj_job1984_5 staj_job1985_1-staj_job1985_5 staj_job1986_1-staj_job1986_5
staj_job1987_1-staj_job1987_5 staj_job1988_1-staj_job1988_5 staj_job1989_1-staj_job1989_5 staj_job1990_1-staj_job1990_5
staj_job1991_1-staj_job1991_5 staj_job1992_1-staj_job1992_5 staj_job1993_1-staj_job1993_5 staj_job1994_1-staj_job1994_5
staj_job1996_1-staj_job1996_5 staj_job1998_1-staj_job1998_12 staj_job2000_1-staj_job2000_10 staj_job2002_1-staj_job2002_9
staj_job2004_1-staj_job2004_12 staj_job2006_1-staj_job2006_11 staj_job2008_1-staj_job2008_11 staj_job2010_1-staj_job2010_9
staj_job2012_1-staj_job2012_9 staj_job2014_1-staj_job2014_14 staj_job2016_1-staj_job2016_8 staj_job2018_1-staj_job2018_19
staj_job2020_1-staj_job2020_13 staj_job2022_1-staj_job2022_14;
do i=1 to 236;
do j=1 to 236;
if i~=j then do;
if staj(i)=-4|staj(i)=-5 then staj(i)=' ';
else if staj(j)=-4| staj(j)=-5 then staj(j)=' ';
else if staj(j)=staj(i) then staj(j)=' ' ;
end;
end;
end;
array job (*) job1-job236;
count=0;
do i=1 to 236;
if staj(i)~=' ' then do;
count=count+1;
j=count;
job(j)=staj(i);
end;
end;
array stad (j) stad1979_1-stad1979_5 stad1980_1-stad1980_5 stad1981_1-stad1981_5 stad1982_1-stad1982_5
stad1983_1-stad1983_5 stad1984_1-stad1984_5 stad1985_1-stad1985_5 stad1986_1-stad1986_5
stad1987_1-stad1987_5 stad1988_1-stad1988_5 stad1989_1-stad1989_5 stad1990_1-stad1990_5
stad1991_1-stad1991_5 stad1992_1-stad1992_5 stad1993_1-stad1993_5 stad1994_1-stad1994_5
stad1996_1-stad1996_5 stad1998_1-stad1998_12 stad2000_1-stad2000_10 stad2002_1-stad2002_9
stad2004_1-stad2004_12 stad2006_1-stad2006_11 stad2008_1-stad2008_11 stad2010_1-stad2010_9
stad2012_1-stad2012_9 stad2014_1-stad2014_14 stad2016_1-stad2016_8 stad2018_1-stad2018_19
stad2020_1-stad2020_13 stad2022_1-stad2022_14;
array stam (j) stam1979_1-stam1979_5 stam1980_1-stam1980_5 stam1981_1-stam1981_5 stam1982_1-stam1982_5
stam1983_1-stam1983_5 stam1984_1-stam1984_5 stam1985_1-stam1985_5 stam1986_1-stam1986_5
stam1987_1-stam1987_5 stam1988_1-stam1988_5 stam1989_1-stam1989_5 stam1990_1-stam1990_5
stam1991_1-stam1991_5 stam1992_1-stam1992_5 stam1993_1-stam1993_5 stam1994_1-stam1994_5
stam1996_1-stam1996_5 stam1998_1-stam1998_12 stam2000_1-stam2000_10 stam2002_1-stam2002_9
stam2004_1-stam2004_12 stam2006_1-stam2006_11 stam2008_1-stam2008_11 stam2010_1-stam2010_9
stam2012_1-stam2012_9 stam2014_1-stam2014_14 stam2016_1-stam2016_8 stam2018_1-stam2018_19
stam2020_1-stam2020_13 stam2022_1-stam2022_14;
array stay (j) stay1979_1-stay1979_5 stay1980_1-stay1980_5 stay1981_1-stay1981_5 stay1982_1-stay1982_5
stay1983_1-stay1983_5 stay1984_1-stay1984_5 stay1985_1-stay1985_5 stay1986_1-stay1986_5
stay1987_1-stay1987_5 stay1988_1-stay1988_5 stay1989_1-stay1989_5 stay1990_1-stay1990_5
stay1991_1-stay1991_5 stay1992_1-stay1992_5 stay1993_1-stay1993_5 stay1994_1-stay1994_5
stay1996_1-stay1996_5 stay1998_1-stay1998_12 stay2000_1-stay2000_10 stay2002_1-stay2002_9
stay2004_1-stay2004_12 stay2006_1-stay2006_11 stay2008_1-stay2008_11 stay2010_1-stay2010_9
stay2012_1-stay2012_9 stay2014_1-stay2014_14 stay2016_1-stay2016_8 stay2018_1-stay2018_19
stay2020_1-stay2020_13 stay2022_1-stay2022_14;
array stod (j) stod1979_1-stod1979_5 stod1980_1-stod1980_5 stod1981_1-stod1981_5 stod1982_1-stod1982_5
stod1983_1-stod1983_5 stod1984_1-stod1984_5 stod1985_1-stod1985_5 stod1986_1-stod1986_5
stod1987_1-stod1987_5 stod1988_1-stod1988_5 stod1989_1-stod1989_5 stod1990_1-stod1990_5
stod1991_1-stod1991_5 stod1992_1-stod1992_5 stod1993_1-stod1993_5 stod1994_1-stod1994_5
stod1996_1-stod1996_5 stod1998_1-stod1998_12 stod2000_1-stod2000_10 stod2002_1-stod2002_9
stod2004_1-stod2004_12 stod2006_1-stod2006_11 stod2008_1-stod2008_11 stod2010_1-stod2010_9
stod2012_1-stod2012_9 stod2014_1-stod2014_14 stod2016_1-stod2016_8 stod2018_1-stod2018_19
stod2020_1-stod2020_13 stod2022_1-stod2022_14;
array stom (j) stom1979_1-stom1979_5 stom1980_1-stom1980_5 stom1981_1-stom1981_5 stom1982_1-stom1982_5
stom1983_1-stom1983_5 stom1984_1-stom1984_5 stom1985_1-stom1985_5 stom1986_1-stom1986_5
stom1987_1-stom1987_5 stom1988_1-stom1988_5 stom1989_1-stom1989_5 stom1990_1-stom1990_5
stom1991_1-stom1991_5 stom1992_1-stom1992_5 stom1993_1-stom1993_5 stom1994_1-stom1994_5
stom1996_1-stom1996_5 stom1998_1-stom1998_12 stom2000_1-stom2000_10 stom2002_1-stom2002_9
stom2004_1-stom2004_12 stom2006_1-stom2006_11 stom2008_1-stom2008_11 stom2010_1-stom2010_9
stom2012_1-stom2012_9 stom2014_1-stom2014_14 stom2016_1-stom2016_8 stom2018_1-stom2018_19
stom2020_1-stom2020_13 stom2022_1-stom2022_14;
array stoy (j) stoy1979_1-stoy1979_5 stoy1980_1-stoy1980_5 stoy1981_1-stoy1981_5 stoy1982_1-stoy1982_5
stoy1983_1-stoy1983_5 stoy1984_1-stoy1984_5 stoy1985_1-stoy1985_5 stoy1986_1-stoy1986_5
stoy1987_1-stoy1987_5 stoy1988_1-stoy1988_5 stoy1989_1-stoy1989_5 stoy1990_1-stoy1990_5
stoy1991_1-stoy1991_5 stoy1992_1-stoy1992_5 stoy1993_1-stoy1993_5 stoy1994_1-stoy1994_5
stoy1996_1-stoy1996_5 stoy1998_1-stoy1998_12 stoy2000_1-stoy2000_10 stoy2002_1-stoy2002_9
stoy2004_1-stoy2004_12 stoy2006_1-stoy2006_11 stoy2008_1-stoy2008_11 stoy2010_1-stoy2010_9
stoy2012_1-stoy2012_9 stoy2014_1-stoy2014_14 stoy2016_1-stoy2016_8 stoy2018_1-stoy2018_19
stoy2020_1-stoy2020_13 stoy2022_1-stoy2022_14;
array stadp1 (j) stadp1_1979_1-stadp1_1979_5 stadp1_1980_1-stadp1_1980_5 stadp1_1981_1-stadp1_1981_5 stadp1_1982_1-stadp1_1982_5
stadp1_1983_1-stadp1_1983_5 stadp1_1984_1-stadp1_1984_5 stadp1_1985_1-stadp1_1985_5 stadp1_1986_1-stadp1_1986_5
stadp1_1987_1-stadp1_1987_5 stadp1_1988_1-stadp1_1988_5 stadp1_1989_1-stadp1_1989_5 stadp1_1990_1-stadp1_1990_5
stadp1_1991_1-stadp1_1991_5 stadp1_1992_1-stadp1_1992_5 stadp1_1993_1-stadp1_1993_5 stadp1_1994_1-stadp1_1994_5
stadp1_1996_1-stadp1_1996_5 stadp1_1998_1-stadp1_1998_12 stadp1_2000_1-stadp1_2000_10 stadp1_2002_1-stadp1_2002_9
stadp1_2004_1-stadp1_2004_12 stadp1_2006_1-stadp1_2006_11 stadp1_2008_1-stadp1_2008_11 stadp1_2010_1-stadp1_2010_9
stadp1_2012_1-stadp1_2012_9 stadp1_2014_1-stadp1_2014_14 stadp1_2016_1-stadp1_2016_8 stadp1_2018_1-stadp1_2018_19
stadp1_2020_1-stadp1_2020_13 stadp1_2022_1-stadp1_2022_14;
array stamp1 (j) stamp1_1979_1-stamp1_1979_5 stamp1_1980_1-stamp1_1980_5 stamp1_1981_1-stamp1_1981_5 stamp1_1982_1-stamp1_1982_5
stamp1_1983_1-stamp1_1983_5 stamp1_1984_1-stamp1_1984_5 stamp1_1985_1-stamp1_1985_5 stamp1_1986_1-stamp1_1986_5
stamp1_1987_1-stamp1_1987_5 stamp1_1988_1-stamp1_1988_5 stamp1_1989_1-stamp1_1989_5 stamp1_1990_1-stamp1_1990_5
stamp1_1991_1-stamp1_1991_5 stamp1_1992_1-stamp1_1992_5 stamp1_1993_1-stamp1_1993_5 stamp1_1994_1-stamp1_1994_5
stamp1_1996_1-stamp1_1996_5 stamp1_1998_1-stamp1_1998_12 stamp1_2000_1-stamp1_2000_10 stamp1_2002_1-stamp1_2002_9
stamp1_2004_1-stamp1_2004_12 stamp1_2006_1-stamp1_2006_11 stamp1_2008_1-stamp1_2008_11 stamp1_2010_1-stamp1_2010_9
stamp1_2012_1-stamp1_2012_9 stamp1_2014_1-stamp1_2014_14 stamp1_2016_1-stamp1_2016_8 stamp1_2018_1-stamp1_2018_19
stamp1_2020_1-stamp1_2020_13 stamp1_2022_1-stamp1_2022_14;
array stayp1 (j) stayp1_1979_1-stayp1_1979_5 stayp1_1980_1-stayp1_1980_5 stayp1_1981_1-stayp1_1981_5 stayp1_1982_1-stayp1_1982_5
stayp1_1983_1-stayp1_1983_5 stayp1_1984_1-stayp1_1984_5 stayp1_1985_1-stayp1_1985_5 stayp1_1986_1-stayp1_1986_5
stayp1_1987_1-stayp1_1987_5 stayp1_1988_1-stayp1_1988_5 stayp1_1989_1-stayp1_1989_5 stayp1_1990_1-stayp1_1990_5
stayp1_1991_1-stayp1_1991_5 stayp1_1992_1-stayp1_1992_5 stayp1_1993_1-stayp1_1993_5 stayp1_1994_1-stayp1_1994_5
stayp1_1996_1-stayp1_1996_5 stayp1_1998_1-stayp1_1998_12 stayp1_2000_1-stayp1_2000_10 stayp1_2002_1-stayp1_2002_9
stayp1_2004_1-stayp1_2004_12 stayp1_2006_1-stayp1_2006_11 stayp1_2008_1-stayp1_2008_11 stayp1_2010_1-stayp1_2010_9
stayp1_2012_1-stayp1_2012_9 stayp1_2014_1-stayp1_2014_14 stayp1_2016_1-stayp1_2016_8 stayp1_2018_1-stayp1_2018_19
stayp1_2020_1-stayp1_2020_13 stayp1_2022_1-stayp1_2022_14;
array code (j) $ a1-a236
('197901' '197902' '197903' '197904' '197905'
'198001' '198002' '198003' '198004' '198005'
'198101' '198102' '198103' '198104' '198105'
'198201' '198202' '198203' '198204' '198205'
'198301' '198302' '198303' '198304' '198305'
'198401' '198402' '198403' '198404' '198405'
'198501' '198502' '198503' '198504' '198505'
'198601' '198602' '198603' '198604' '198605'
'198701' '198702' '198703' '198704' '198705'
'198801' '198802' '198803' '198804' '198805'
'198901' '198902' '198903' '198904' '198905'
'199001' '199002' '199003' '199004' '199005'
'199101' '199102' '199103' '199104' '199105'
'199201' '199202' '199203' '199204' '199205'
'199301' '199302' '199303' '199304' '199305'
'199401' '199402' '199403' '199404' '199405'
'199601' '199602' '199603' '199604' '199605'
'199801' '199802' '199803' '199804' '199805' '199806' '199807' '199808' '199809' '199810'
'199811' '199812'
'200001' '200002' '200003' '200004' '200005' '200006' '200007' '200008' '200009' '200010'
'200201' '200202' '200203' '200204' '200205' '200206' '200207' '200208' '200209'
'200401' '200402' '200403' '200404' '200405' '200406' '200407' '200408' '200409' '200410'
'200411' '200412'
'200601' '200602' '200603' '200604' '200605' '200606' '200607' '200608' '200609' '200610'
'200611'
'200801' '200802' '200803' '200804' '200805' '200806' '200807' '200808' '200809' '200810'
'200811'
'201001' '201002' '201003' '201004' '201005' '201006' '201007' '201008' '201009'
'201201' '201202' '201203' '201204' '201205' '201206' '201207' '201208' '201209'
'201401' '201402' '201403' '201404' '201405' '201406' '201407' '201408' '201409' '201410'
'201411' '201412' '201413' '201414'
'201601' '201602' '201603' '201604' '201605' '201606' '201607' '201608'
'201801' '201802' '201803' '201804' '201805' '201806' '201807' '201808' '201809' '201810'
'201811' '201812' '201813' '201814' '201815' '201816' '201817' '201818' '201819'
'202001' '202002' '202003' '202004' '202005' '202006' '202007' '202008' '202009' '202010'
'202011' '202012' '202013'
'202201' '202202' '202203' '202204' '202205' '202206' '202207' '202208' '202209' '202210'
'202211' '202212' '202213' '202214');
do over stay;
sta_d=stad;
sta_m=stam;
sta_y=stay;
sto_d=stod;
sto_m=stom;
sto_y=stoy;
gapsta_d=stadp1;
gapsta_m=stamp1;
gapsta_y=stayp1;
jobcode=code;
output;
end;
array dido (k) did1979 did1980 did1981 did1982 did1983 did1984 did1985 did1986 did1987 did1988
did1989 did1990 did1991 did1992 did1993 did1994 did1996 did1998 did2000 did2002
did2004 did2006 did2008 did2010 did2012 did2014 did2016 did2018 did2020 did2022;
array dimo (k) dim1979 dim1980 dim1981 dim1982 dim1983 dim1984 dim1985 dim1986 dim1987 dim1988
dim1989 dim1990 dim1991 dim1992 dim1993 dim1994 dim1996 dim1998 dim2000 dim2002
dim2004 dim2006 dim2008 dim2010 dim2012 dim2014 dim2016 dim2018 dim2020 dim2022;
array diyo (k) diy1979 diy1980 diy1981 diy1982 diy1983 diy1984 diy1985 diy1986 diy1987 diy1988
diy1989 diy1990 diy1991 diy1992 diy1993 diy1994 diy1996 diy1998 diy2000 diy2002
diy2004 diy2006 diy2008 diy2010 diy2012 diy2014 diy2016 diy2018 diy2020 diy2022;
array dlido (k) dlid1979 dlid1980 dlid1981 dlid1982 dlid1983 dlid1984 dlid1985 dlid1986 dlid1987 dlid1988
dlid1989 dlid1990 dlid1991 dlid1992 dlid1993 dlid1994 dlid1996 dlid1998 dlid2000 dlid2002
dlid2004 dlid2006 dlid2008 dlid2010 dlid2012 dlid2014 dlid2016 dlid2018 dlid2020 dlid2022;
array dlimo (k) dlim1979 dlim1980 dlim1981 dlim1982 dlim1983 dlim1984 dlim1985 dlim1986 dlim1987 dlim1988
dlim1989 dlim1990 dlim1991 dlim1992 dlim1993 dlim1994 dlim1996 dlim1998 dlim2000 dlim2002
dlim2004 dlim2006 dlim2008 dlim2010 dlim2012 dlim2014 dlim2016 dlim2018 dlim2020 dlim2022;
array dliyo (k) dliy1979 dliy1980 dliy1981 dliy1982 dliy1983 dliy1984 dliy1985 dliy1986 dliy1987 dliy1988
dliy1989 dliy1990 dliy1991 dliy1992 dliy1993 dliy1994 dliy1996 dliy1998 dliy2000 dliy2002
dliy2004 dliy2006 dliy2008 dliy2010 dliy2012 dliy2014 dliy2016 dliy2018 dliy2020 dliy2022;
array code (k) $ a1-a30
('1979' '1980' '1981' '1982' '1983' '1984' '1985' '1986' '1987' '1988'
'1989' '1990' '1991' '1992' '1993' '1994' '1996' '1998' '2000' '2002'
'2004' '2006' '2008' '2010' '2012' '2014' '2016' '2018' '2020' '2022');
do over dido;
dim=dimo;
did=dido;
diy=diyo;
dlim=dlimo;
dlid=dlido;
dliy=dliyo;
year=code;
output;
end;
if sta_y=0 or sta_y=1900 then do;
sta_d=-3;
sta_m=-3;
sta_y=-3;
end;
lintdate=mdy(dlim, dlid, dliy);
startdate=mdy(sta_m, sta_d, sta_y);
gapdate=mdy(gapsta_m, gapsta_d, gapsta_y);
stopdate=mdy(sto_m, sto_d, sto_y);
intdate=mdy(dim, did, diy);
if (sta_d<0 and sta_m>0 and sta_y>0) then do;
sta_d1=1;
sta_m1=sta_m;
sta_y1=sta_y;
end;
else if (sta_d<0 and sta_m<0 and sta_y>0) then do;
sta_d1=1;
sta_m1=1;
sta_y1=sta_y;
end;
else if (sta_d>0 and sta_m<0 and sta_y>0) then do;
if stopdate>0 and sta_y<sto_y and sta_y>dliy then do;
sta_m1=1;
sta_d1=sta_d;
sta_y1=sta_y;
end;
else if stopdate>0 and sta_y<sto_y and sta_y=dliy then do;
sta_m1=dlim+3;
sta_d1=sta_d;
sta_y1=sta_y;
end;
else if stopdate>0 and sta_y=sto_y and sta_y>=dliy then do;
sta_m1=sto_m-1;
sta_d1=sta_d;
sta_y1=sta_y;
end;
else if stopdate=. and sto_y>0 and dliy<sto_y then do;
sta_m1=1;
sta_d1=sta_d;
sta_y1=sta_y;
end;
end;
else if (sta_y<0) then do;
if gapsta_y>0 then do;
if gapsta_d<0 and gapsta_m<0 then do;
sta_d1=1;
sta_m1=8;
sta_y1=2004;
end;
else if gapsta_d<0 and gapsta_m>0 then do;
gapsta_d=1;
a=((mdy(gapsta_m, gapsta_d, gapsta_y))-(lintdate))/2;
b=lintdate+a;
sta_d1=day(b);
sta_m1=month(b);
sta_y1=year(b);
end;
else if gapsta_d>0 and gapsta_m>0 then do;;
if year=1979 then do;
sta_d1=gapsta_d;
sta_m1=gapsta_m;
sta_y1=gapsta_y;
end;
else if year~=1979 then do;
a=(gapdate-lintdate)/2;
b=lintdate+a;
sta_d1=day(b);
sta_m1=month(b);
sta_y1=year(b);
end;
end;
end;
else if gapsta_y<0 then do;
if year=1979 then do;
b=intdate-180;
sta_d1=day(b);
sta_m1=month(b);
sta_y1=year(b);
end;
else if stopdate<lintdate and stopdate~=. then do;
b=stopdate-90;
sta_d1=day(b);
sta_m1=month(b);
sta_y1=year(b);
end;
else if stopdate<intdate and stopdate~=. then do;
a=(stopdate-lintdate)/2;
b=lintdate+a;
sta_d1=day(b);
sta_m1=month(b);
sta_y1=year(b);
end;
else if stopdate=intdate or stopdate=. then do;
a=(intdate-lintdate)/2;
b=lintdate+a;
sta_d1=day(b);
sta_m1=month(b);
sta_y1=year(b);
end;
end;
end;
else do;
sta_d1=sta_d;
sta_m1=sta_m;
sta_y1=sta_y;
end;
if sta_y1<0 then do;
c=intdate-365;
sta_d1=day(c);
sta_m1=month(c);
sta_y1=year(c);
end;
startdate1=mdy(sta_m1, sta_d1, sta_y1);
if diy>=2014 then do;
if startdate1<lintdate then do;
sta_m1=dlim;
sta_d1=dlid+1;
sta_y1=dliy;
end;
end;
proc sort; by norcid sta_y1 sta_m1 sta_d1;
run;dliy then do;
sta_m1=1;
sta_d1=sta_d;
sta_y1=sta_y;
end;
else if stopdate>0 and sta_y0 and sta_y=sto_y and sta_y>=dliy then do;
sta_m1=sto_m-1;
sta_d1=sta_d;
sta_y1=sta_y;
end;
else if stopdate=. and sto_y>0 and dliy0 then do;
if gapsta_d<0 and gapsta_m<0 then do;
sta_d1=1;
sta_m1=8;
sta_y1=2004;
end;
else if gapsta_d<0 and gapsta_m>0 then do;
gapsta_d=1;
a=((mdy(gapsta_m, gapsta_d, gapsta_y))-(lintdate))/2;
b=lintdate+a;
sta_d1=day(b);
sta_m1=month(b);
sta_y1=year(b);
end;
else if gapsta_d>0 and gapsta_m>0 then do;;
if year=1979 then do;
sta_d1=gapsta_d;
sta_m1=gapsta_m;
sta_y1=gapsta_y;
end;
else if year~=1979 then do;
a=(gapdate-lintdate)/2;
b=lintdate+a;
sta_d1=day(b);
sta_m1=month(b);
sta_y1=year(b);
end;
end;
end;
else if gapsta_y<0 then do;
if year=1979 then do;
b=intdate-180;
sta_d1=day(b);
sta_m1=month(b);
sta_y1=year(b);
end;
else if stopdate=2014 then do;
if startdate1
Employers_roster_22_uid_name_stadate
%macro id(a,yra); %do i=1 %to 9; if job&a=put((&yra.0&i),6.) then do; unique_id_&a=put((&yra.0&i),6.)||'00'; if empname&yra._&i~=' ' then empname_&a=empname&yra._&i; else if empname&yra._&i=' ' then empname_&a='MISSING NAME'; if (stad&yra._&i~=-4|stam&yra._&i~=-4|stay&yra._&i~=-4) then do; stad_ori_&a=stad&yra._&i; stam_ori_&a=stam&yra._&i; stay_ori_&a=stay&yra._&i; end; else if (stad&yra._&i=-4 and stam&yra._&i=-4 and stay&yra._&i=-4) then do; stad_ori_&a=-3; stam_ori_&a=-3; stay_ori_&a=-3; end; end; %end; %do i=10 %to 14; if job&a=put((&yra&i),6.) then do; unique_id_&a=put((&yra&i),6.)||'00'; if empname&yra._&i~=' ' then empname_&a=empname&yra._&i; else if empname&yra._&i=' ' then empname_&a='MISSING NAME'; if (stad&yra._&i~=-4|stam&yra._&i~=-4|stay&yra._&i~=-4) then do; stad_ori_&a=stad&yra._&i; stam_ori_&a=stam&yra._&i; stay_ori_&a=stay&yra._&i; end; else if (stad&yra._&i=-4 and stam&yra._&i=-4 and stay&yra._&i=-4) then do; stad_ori_&a=-3; stam_ori_&a=-3; stay_ori_&a=-3; end; end; %end; %mend id; %macro jb(yra); %do a=1 %to 67; %id(&a,&yra); %end; %mend jb; %macro rds; %do yra = 2022 %to 2022; %jb(&yra); %end; %mend rds; %rds;
Employers_roster_22_id
%macro id(yra); %do a=1 %to 67; %do i=1 %to 9; if job&a=put((&yra.0&i),6.) and job2022_job&yra._&i>0 then id_2022_&a=job2022_job&yra._&i; else if job&a=put((&yra.0&i),6.) and job2022_job&yra._&i=-5 then id_2022_&a=-5; %end; %do i=10 %to 19; if job&a=put((&yra&i),6.) and job2022_job&yra._&i>0 then id_2022_&a=job2022_job&yra._&i; else if job&a=put((&yra&i),6.) and job2022_job&yra._&i=-5 then id_2022_&a=-5; %end; %end; %mend id; %macro rd; %do yra = 1979 %to 1994; %id(&yra); %end; %do yra = 1996 %to 2022 %by 2; %id(&yra); %end; %mend rd; %rd;
Employers_roster_22_others
%macro att(yrb,b); %do l=1 %to 14; if id_&yrb._&b=&l then do; *CPS job; if cpsemp&yrb._&l~=-4 and cpsemp&yrb._&l~=. then cpsjob_&yrb._&b=cpsemp&yrb._&l; else if cpsemp&yrb._&l=-4|cpsemp&yrb._&l=. then cpsjob_&yrb._&b=-4; *occupation code; if occ&yrb._&l~=-4 and occ&yrb._&l~=. then occ_&yrb._&b=occ&yrb._&l; else if occ&yrb._&l=-4|occ&yrb._&l=. then occ_&yrb._&b=-4; *industry code; if ind&yrb._&l~=-4 and ind&yrb._&l~=. then ind_&yrb._&b=ind&yrb._&l; else if ind&yrb._&l=-4|ind&yrb._&l=. then ind_&yrb._&b=-4; *class of worker; if cow&yrb._&l~=-4 and cow&yrb._&l~=. then cow_&yrb._&b=cow&yrb._&l; else if cow&yrb._&l=-4|cow&yrb._&l=. then cow_&yrb._&b=-4; *rate of pay; if rop&yrb._&l~=-4 and rop&yrb._&l~=. then rop_&yrb._&b=rop&yrb._&l; else if rop&yrb._&l=-4|rop&yrb._&l=. then rop_&yrb._&b=-4; *time unit to interpret payrate; if tu&yrb._&l~=-4 and tu&yrb._&l~=. then turop_&yrb._&b=tu&yrb._&l; else if tu&yrb._&l=-4|tu&yrb._&l=. then turop_&yrb._&b=-4; *hourly rate of pay; if hrp&yrb._&l~=-4 and hrp&yrb._&l~=. then hrp_&yrb._&b=hrp&yrb._&l; else if hrp&yrb._&l=-4|hrp&yrb._&l=. then hrp_&yrb._&b=-4; *union; if uni&yrb._&l~=-4 and uni&yrb._&l~=. then uni_&yrb._&b=uni&yrb._&l; else if uni&yrb._&l=-4|uni&yrb._&l=. then uni_&yrb._&b=-4; *hours worked per day; if hrsday&yrb._&l~=-4 and hrsday&yrb._&l~=. then hrsday_&yrb._&b=hrsday&yrb._&l; else if hrsday&yrb._&l=-4|hrsday&yrb._&l=. then hrsday_&yrb._&b=-4; *hours worked per week; if hrswk&yrb._&l~=-4 and hrswk&yrb._&l~=. then hrswk_&yrb._&b=hrswk&yrb._&l; else if hrswk&yrb._&l=-4|hrswk&yrb._&l=. then hrswk_&yrb._&b=-4; *months worked for employer before last int; if mosli&yrb._&l~=-4 and mosli&yrb._&l~=. then mosli_&yrb._&b=mosli&yrb._&l; else if mosli&yrb._&l=-4|mosli&yrb._&l=. then mosli_&yrb._&b=-4; *tenure; if ten&yrb._&l~=-4 and ten&yrb._&l~=. then tenure_&yrb._&b=ten&yrb._&l; else if ten&yrb._&l=-4|ten&yrb._&l=. then tenure_&yrb._&b=-4; *working at job before di; if (wbefdi&yrb._&l~=-4 and wbefdi&yrb._&l~=.) then wbefdi_&yrb._&b=wbefdi&yrb._&l; if (wbefdi&yrb._&l=-4|wbefdi&yrb._&l=.) then wbefdi_&yrb._&b=-4; *previous employer ID; if (previd&yrb._&l~=-4 and previd&yrb._&l~=.) then previd_&yrb._&b=previd&yrb._&l; if (previd&yrb._&l=-4|previd&yrb._&l=.) then previd_&yrb._&b=-4; *job number loaded into A array; if job_num_a&yrb._&l~=-4 and job_num_a&yrb._&l~=. then jobnum_a_&yrb._&b=job_num_a&yrb._&l; else if job_num_a&yrb._&l=-4|job_num_a&yrb._&l=. then jobnum_a_&yrb._&b=-4; *currently woring at job; if curwk&yrb._&l~=-4 and curwk&yrb._&l~=. then curwk_&yrb._&b=curwk&yrb._&l; else if curwk&yrb._&l=-4|curwk&yrb._&l=. then curwk_&yrb._&b=-4; *reason left job; if (curwk&yrb._&l>=-3 and curwk&yrb._&l<=0) and (releft&yrb._&l~=-4 and releft&yrb._&l~=.) then releft_&yrb._&b=releft&yrb._&l; else if (curwk&yrb._&l>=-3 and curwk&yrb._&l<0) and (releft&yrb._&l=-4|releft&yrb._&l=.) then releft_&yrb._&b=-4; else if curwk&yrb._&l=0 and (releft&yrb._&l=-4|releft&yrb._&l=.) then releft_&yrb._&b=-3; else if curwk&yrb._&l=-4 and (releft&yrb._&l=-4|releft&yrb._&l=.) then releft_&yrb._&b=-4; else if curwk&yrb._&l=1 then releft_&yrb._&b=-4; end; else if id_&yrb._&b=-5 then do; cpsjob_&yrb._&b=-5; occ_&yrb._&b=-5; ind_&yrb._&b=-5; cow_&yrb._&b=-5; rop_&yrb._&b=-5; turop_&yrb._&b=-5; hrp_&yrb._&b=-5; uni_&yrb._&b=-5; hrsday_&yrb._&b=-5; hrswk_&yrb._&b=-5; mosli_&yrb._&b=-5; tenure_&yrb._&b=-5; wbefdi_&yrb._&b=-5; previd_&yrb._&b=-5; jobnum_a_&yrb._&b=-5; curwk_&yrb._&b=-5; releft_&yrb._&b=-5; end; %end; %mend att; %macro rd(b); %do yrb = 2022 %to 2022; %att(&yrb,&b); %end; %mend rd; %macro job; %do b=1 %to 67; %rd(&b); %end; %mend job; %job;
Employers_roster_22_stodate_whyleft
%macro id(a,yra,yrb); %do i=1 %to 9; if endj_job&yra._&a=put((&yrb.0&i),6.) then do; if curwk&yrb._&i>=-3 & curwk&yrb._&i<=0 then do; reasonleft&yra._&a=whyleft_recode&yrb._&i; reasonleftC&yra._&a=whyleft_recodeC&yrb._&i; end; else if (curwk&yrb._&i>=-3 & curwk&yrb._&i<0) & (whyleft_recode&yrb._&i=.) then do; reasonleft&yra._&a=-4; reasonleftC&yra._&a=-4; end; else if curwk&yrb._&i=0 & (whyleft_recode&yrb._&i=.) then do; reasonleft&yra._&a=-3; reasonleftC&yra._&a=-3; end; end; %end; %do i=10 %to 14; if endj_job&yra._&a=put((&yrb&i),6.) then do; if curwk&yrb._&i>=-3 & curwk&yrb._&i<=0 then do; reasonleft&yra._&a=whyleft_recode&yrb._&i; reasonleftC&yra._&a=whyleft_recodeC&yrb._&i; end; else if (curwk&yrb._&i>=-3 & curwk&yrb._&i<0) & (whyleft_recode&yrb._&i=.) then do; reasonleft&yra._&a=-4; reasonleftC&yra._&a=-4; end; else if curwk&yrb._&i=0 & (whyleft_recode&yrb._&i=.) then do; reasonleft&yra._&a=-3; reasonleftC&yra._&a=-3; end; end; %end; %mend id; %macro jb(yra,yrb); %do a=1 %to 19; %id(&a,&yra,&yrb); %end; %mend jb; %macro rd(yrb); %do yra = 1979 %to 1994; %jb(&yra,&yrb); %end; %do yra = 1996 %to 2022 %by 2; %jb(&yra,&yrb); %end; %mend rd; %macro rds; %do yrb = 2022 %to 2022; %rd(&yrb); %end; %mend rds; %rds; %macro id(a,yra); %do i=1 %to 9; if job&a=put((&yra.0&i),6.) then do; if (stod_final&yra._&i~=-4|stom_final&yra._&i~=-4|stoy_final&yra._&i~=-4) then do; stod_fin_&a=stod_final&yra._&i; stom_fin_&a=stom_final&yra._&i; stoy_fin_&a=stoy_final&yra._&i; end; else if (stod_final&yra._&i=-4 and stom_final&yra._&i=-4 and stoy_final&yra._&i=-4) then do; stod_fin_&a=-3; stom_fin_&a=-3; stoy_fin_&a=-3; end; reasonleft_&a=reasonleft&yra._&i; reasonleftC_&a=reasonleftC&yra._&i; end; %end; %do i=10 %to 14; if job&a=put((&yra&i),6.) then do; if (stod_final&yra._&i~=-4|stom_final&yra._&i~=-4|stoy_final&yra._&i~=-4) then do; stod_fin_&a=stod_final&yra._&i; stom_fin_&a=stom_final&yra._&i; stoy_fin_&a=stoy_final&yra._&i; end; else if (stod_final&yra._&i=-4 and stom_final&yra._&i=-4 and stoy_final&yra._&i=-4) then do; stod_fin_&a=-3; stom_fin_&a=-3; stoy_fin_&a=-3; end; reasonleft_&a=reasonleft&yra._&i; reasonleftC_&a=reasonleftC&yra._&i; end; %end; %mend id; %macro jb(yra); %do a=1 %to 67; %id(&a,&yra); %end; %mend jb; %macro rds; %do yra = 1979 %to 1994; %jb(&yra); %end; %do yra = 1996 %to 2022 %by 2; %jb(&yra); %end; %mend rds; %rds;
Employers_roster_22_stdate_stweek
%macro att(yrb,b); %do l=1 %to 14; if id_&yrb._&b=&l then do; *Start day; if stad&yrb._&l~=-4 then stad_&yrb._&b=stad&yrb._&l; else if stad&yrb._&l=-4 then stad_&yrb._&b=-3; *Start month; if stam&yrb._&l~=-4 then stam_&yrb._&b=stam&yrb._&l; else if stam&yrb._&l=-4 then stam_&yrb._&b=-3; *Start year; if stay&yrb._&l~=-4 then stay_&yrb._&b=stay&yrb._&l; else if stay&yrb._&l=-4 then stay_&yrb._&b=-3; *Stop day; if stod&yrb._&l~=-4 then stod_&yrb._&b=stod&yrb._&l; else if stod&yrb._&l=-4 then stod_&yrb._&b=-3; *Stop month; if stom&yrb._&l~=-4 then stom_&yrb._&b=stom&yrb._&l; else if stom&yrb._&l=-4 then stom_&yrb._&b=-3; *Stop year; if stoy&yrb._&l~=-4 then stoy_&yrb._&b=stoy&yrb._&l; else if stoy&yrb._&l=-4 then stoy_&yrb._&b=-3; *Start week; if stawk&yrb._&l~=-4 then stawk_&yrb._&b=stawk&yrb._&l; else if stawk&yrb._&l=-4 then stawk_&yrb._&b=-3; *Stop week; if stowk&yrb._&l~=-4 then stowk_&yrb._&b=stowk&yrb._&l; else if stowk&yrb._&l=-4 then stowk_&yrb._&b=-3; end; else if id_&yrb._&b=-5 then do; stad_&yrb._&b=-5; stam_&yrb._&b=-5; stay_&yrb._&b=-5; stod_&yrb._&b=-5; stom_&yrb._&b=-5; stoy_&yrb._&b=-5; stawk_&yrb._&b=-5; stowk_&yrb._&b=-5; end; %end; %mend att; %macro rd(b); %do yrb = 2022 %to 2022; %att(&yrb,&b); %end; %mend rd; %macro job; %do b=1 %to 67; %rd(&b); %end; %mend job; %job;
Employers_roster_22_wksnotworked
%macro att(b); %do l=1 %to 19; %do k=1 %to 4; if id_2022_&b=&l and unemsdli2022_&l=1 then do; unem_2022_&b=1; if stawkgap&k._2022_&l~=-4 and stawkgap&k._2022_&l~=. then stawk_gap&k._2022_&b=stawkgap&k._2022_&l; if stowkgap&k._2022_&l~=-4 and stowkgap&k._2022_&l~=. then stowk_gap&k._2022_&b=stowkgap&k._2022_&l; if reap&k._2022_&l~=-4 and reap&k._2022_&l~=. then rea_gap&k._2022_&b=reap&k._2022_&l; if lookp&k._2022_&l~=-4 and lookp&k._2022_&l~=. then look_gap&k._2022_&b=lookp&k._2022_&l; if nlookp&k._2022_&l~=-4 and nlookp&k._2022_&l~=. then nlook_gap&k._2022_&b=nlookp&k._2022_&l; end; %end; %end; %mend att; %macro job; %do b=1 %to 67; %att(&b); %end; %mend job; %job;