MEPS HC-211: 2019 Jobs File

Appendix 2: Sample Stata Program

Appendix 1. Sample SAS Program


5 *** APP19.sas ***;
6
7 OPTIONS LS=132 PS=79;
8

9
10 *** Program Name: SAMPLE.SAS ***
11 *** ***
12 *** Description: This job provides an example of how to get job info ***
13 *** from Round 1 or Round 2 in the FY2018 JOBS file when ***
14 *** a Round 3 current main job in the FY2019 JOBS file ***
15 *** is a continuation job. ***
16 *** ***
17 *** This example creates a dataset of Round 3 continuation ***
18 *** JOBS records with a SICKPAYX variable copied from the ***
19 *** Round 1 or Round 2 newly reported job. ***
20 *** ***
21 ;

22
23 libname jobs18 "c:\mydata\jobs18";
24 libname jobs19 " c:\mydata\jobs19";
25
26 *** Select continuing Panel 23, Round 3 Current Main JOBS ***
27 *** (SUBTYPE=1, STILLAT=1) from the FY 2019 JOBS file and ***
28 *** print selected variables from the first 20 observations ***;
29
30 data j19r3;
31 set jobs19.jobs19;
32 if panel=23
33 and rn=3
34 and subtype=1
35 and stillat=1
36 and sickpay=-1;
37 run;

NOTE: There were 50334 observations read from the data set JOBS19.JOBS19.
NOTE: The data set WORK.J19R3 has 5475 observations and 84 variables.
NOTE: Compressing data set WORK.J19R3 decreased size by 3.45 percent.
Compressed is 28 pages; un-compressed would require 29 pages.
NOTE: DATA statement used (Total process time):
real time 0.95 seconds
cpu time 0.09 seconds

38
39 proc print data=j19r3 (obs=20);
40 title 'Print Sample of Continuation Round 3 Records';
41 var jobidx panel rn subtype stillat sickpay;
42 run;

NOTE: There were 20 observations read from the data set WORK.J19R3.
NOTE: The PROCEDURE PRINT printed page 1.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.06 seconds
cpu time 0.01 seconds

43
44
45 *** Select newly reported Panel 23 Current Main JOBS records from ***
46 *** the FY 2018 JOBS file and print selected variables from the ***
47 *** first 20 observations. ***;
48
49 data j1812;
50 set jobs18.jobs18;
51 if subtype=1
52 and stillat=-1
53 and panel=23
54 and rn in (1,2);
55 run;

NOTE: There were 53323 observations read from the data set JOBS18.JOBS18.
NOTE: The data set WORK.J1812 has 7774 observations and 85 variables.
NOTE: Compressing data set WORK.J1812 decreased size by 7.14 percent.
Compressed is 39 pages; un-compressed would require 42 pages.
NOTE: DATA statement used (Total process time):
real time 0.69 seconds
cpu time 0.06 seconds

56
57 proc print data=j1812 (obs=20);
58 title 'Print Sample of Newly Reported Round 1 and Round 2 Records';
59 var jobidx panel rn subtype stillat sickpay;
60 run;

NOTE: There were 20 observations read from the data set WORK.J1812.
NOTE: The PROCEDURE PRINT printed page 2.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

61
62 proc freq data=j1812;
63 tables sickpay/list missing;
64 title 'Sickpay Value of FY2018 Round 1 and Round 2 Newly Reported CMJs';
65 run;

NOTE: There were 7774 observations read from the data set WORK.J1812.
NOTE: The PROCEDURE FREQ printed page 3.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.04 seconds
cpu time 0.01 seconds

66
67
68 *** Prepare FY18 and FY19 data for merge ***;
69
70 proc sort data=j19r3;
71 by jobidx;
72 run;

NOTE: There were 5475 observations read from the data set WORK.J19R3.
NOTE: SAS sort was used.
NOTE: The data set WORK.J19R3 has 5475 observations and 84 variables.
NOTE: Compressing data set WORK.J19R3 decreased size by 3.45 percent.
Compressed is 28 pages; un-compressed would require 29 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

73
74 proc sort data=j1812;
75 by jobidx;
76 run;

NOTE: There were 7774 observations read from the data set WORK.J1812.
NOTE: SAS sort was used.
NOTE: The data set WORK.J1812 has 7774 observations and 85 variables.
NOTE: Compressing data set WORK.J1812 decreased size by 7.14 percent.
Compressed is 39 pages; un-compressed would require 42 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.02 seconds
cpu time 0.03 seconds

77
78
79 *** Create a dataset (J19R3F) that includes all variables ***
80 *** for the continuation Round 3 Current Main JOBS and create ***
81 *** the new variable SICKPAYX by copying SICKPAY from the ***
82 *** corresponding Round 1 or Round 2 newly reported job record. ***;
83
84 data j19r3f;
85 merge j19r3 (in=a) j1812 (in=b keep = jobidx sickpay
86 rename=(sickpay=SICKPAYX));
87 by jobidx;
88 if a and b;
89 run;

NOTE: There were 5475 observations read from the data set WORK.J19R3.
NOTE: There were 7774 observations read from the data set WORK.J1812.
NOTE: The data set WORK.J19R3F has 5473 observations and 85 variables.
NOTE: Compressing data set WORK.J19R3F decreased size by 3.45 percent.
Compressed is 28 pages; un-compressed would require 29 pages.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds

90
91 proc freq data=j19r3f;
92 tables sickpay*sickpayx/list missing;
93 title1 'Diagnostic Post-Merge - Sickpay * Sickpayx';
94 title2 'Round 3 Continuation Current Main Jobs Only';
95 run;

NOTE: There were 5473 observations read from the data set WORK.J19R3F.
NOTE: The PROCEDURE FREQ printed page 4.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

Print Sample of Continuation Round 3 Records

Return to Top

Print Sample of Continuation Round 3 Records

Obs JOBIDX PANEL RN SUBTYPE STILLAT SICKPAY
1 2320002102101 23 3 1 1 -1
2 2320008102101 23 3 1 1 -1
3 2320019102205 23 3 1 1 -1
4 2320019104204 23 3 1 1 -1
5 2320022104105 23 3 1 1 -1
6 2320024102102 23 3 1 1 -1
7 2320027102103 23 3 1 1 -1
8 2320028102102 23 3 1 1 -1
9 2320032101101 23 3 1 1 -1
10 2320032102102 23 3 1 1 -1
11 2320035101102 23 3 1 1 -1
12 2320036101102 23 3 1 1 -1
13 2320036102101 23 3 1 1 -1
14 2320038101101 23 3 1 1 -1
15 2320039101102 23 3 1 1 -1
16 2320039102101 23 3 1 1 -1
17 2320041101101 23 3 1 1 -1
18 2320043101101 23 3 1 1 -1
19 2320043102102 23 3 1 1 -1
20 2320044102103 23 3 1 1 -1

Return to Top

Print Sample of Newly Reported Round 1 and Round 2 Records

Obs JOBIDX PANEL RN SUBTYPE STILLAT SICKPAY
1 2320002101201 23 1 1 -1 2
2 2320002101203 23 2 1 -1 2
3 2320002102101 23 1 1 -1 1
4 2320003102102 23 1 1 -1 -8
5 2320008102101 23 1 1 -1 1
6 2320019101101 23 1 1 -1 1
7 2320019102203 23 1 1 -1 2
8 2320019102205 23 2 1 -1 -1
9 2320019103201 23 1 1 -1 2
10 2320019104204 23 1 1 -1 1
11 2320022103103 23 1 1 -1 2
12 2320022104104 23 1 1 -1 2
13 2320022104105 23 2 1 -1 1
14 2320024102102 23 1 1 -1 1
15 2320027102103 23 1 1 -1 1
16 2320028102102 23 1 1 -1 2
17 2320032101101 23 1 1 -1 1
18 2320032102102 23 1 1 -1 1
19 2320034101101 23 1 1 -1 1
20 2320034102102 23 1 1 -1 2

Return to Top

Sickpay Value of FY2018 Round 1 and Round 2 Newly Reported CMJs

HAS PAID SICK LEAVE THRU JOB

SICKPAY Frequency Percent Cumulative Frequency Cumulative Percent
-8 246 3.16 246 3.16
-7 18 0.23 264 3.40
-1 921 11.85 1185 15.24
1 4066 52.30 5251 67.55
2 2523 32.45 7774 100.00

Return to Top

Diagnostic Post-Merge - Sickpay * Sickpayx
Round 3 Continuation Current Main Jobs Only


SICKPAY SICKPAYX Frequency Percent Cumulative Frequency Cumulative Percent
-1 -8 144 2.63 144 2.63
-1 -7 14 0.26 158 2.89
-1 -1 715 13.06 873 15.95
-1 1 3105 56.73 3978 72.68
-1 2 1495 27.32 5473 100.00

Return to Top