Appendix 1. Sample SAS Program


4
5 *** APP16.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 FY2015 JOBS file when ***
14 *** a Round 3 current main job in the FY2016 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 jobs15 "c:\mydata\jobs15";
24 libname jobs16 "c:\mydata\jobs16";
25
26 *** Select continuing Panel 20, Round 3 Current Main JOBS ***
27 *** (SUBTYPE=1, STILLAT=1) from the FY 2016 JOBS file and ***
28 *** print selected variables from the first 20 observations ***;
29
30 data j16r3;
31 set jobs16.jobs16;
32 if panel=20
33 and rn=3
34 and subtype=1
35 and stillat=1
36 and sickpay=-1;
37 run;

NOTE: There were 59068 observations read from the data set JOBS16.JOBS16.
NOTE: The data set WORK.J16R3 has 6502 observations and 77 variables.
NOTE: Compressing data set WORK.J16R3 decreased size by 3.33 percent.
Compressed is 29 pages; un-compressed would require 30 pages.
NOTE: DATA statement used (Total process time):
real time 0.70 seconds
cpu time 0.07 seconds
38

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

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

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

NOTE: There were 60674 observations read from the data set JOBS15.JOBS15.
NOTE: The data set WORK.J1512 has 9399 observations and 77 variables.
NOTE: Compressing data set WORK.J1512 decreased size by 6.98 percent.
Compressed is 40 pages; un-compressed would require 43 pages.
NOTE: DATA statement used (Total process time):
real time 0.79 seconds
cpu time 0.04 seconds

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

NOTE: There were 20 observations read from the data set WORK.J1512.
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=j1512;
63 tables sickpay/list missing;
64 title 'Sickpay Value of FY2015 Round 1 and Round 2 Newly Reported CMJs';
65 run;

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

66
67
68 *** Prepare FY15 and FY16 data for merge ***;
69
70 proc sort data=j16r3;
71 by dupersid jobsn;
72 run;

NOTE: There were 6502 observations read from the data set WORK.J16R3.
NOTE: SAS sort was used.
NOTE: The data set WORK.J16R3 has 6502 observations and 77 variables.
NOTE: Compressing data set WORK.J16R3 decreased size by 3.33 percent.
Compressed is 29 pages; un-compressed would require 30 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.05 seconds
cpu time 0.03 seconds

73
74 proc sort data=j1512;
75 by dupersid jobsn;
76 run;

NOTE: There were 9399 observations read from the data set WORK.J1512.
NOTE: SAS sort was used.
NOTE: The data set WORK.J1512 has 9399 observations and 77 variables.
NOTE: Compressing data set WORK.J1512 decreased size by 6.98 percent.
Compressed is 40 pages; un-compressed would require 43 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds

77
78
79 *** Create a dataset (J16R3F) 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 j16r3f;
85 merge j16r3 (in=a) j1512 (in=b keep = dupersid jobsn sickpay
86 rename=(sickpay=SICKPAYX));
87 by dupersid jobsn;
88 if a and b;
89 run;

NOTE: There were 6502 observations read from the data set WORK.J16R3.
NOTE: There were 9399 observations read from the data set WORK.J1512.
NOTE: The data set WORK.J16R3F has 6502 observations and 78 variables.
NOTE: Compressing data set WORK.J16R3F decreased size by 3.33 percent.
Compressed is 29 pages; un-compressed would require 30 pages.
NOTE: DATA statement used (Total process time):
real time 0.04 seconds
cpu time 0.03 seconds

90
91 proc freq data=j16r3f;
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 6502 observations read from the data set WORK.J16R3F.
NOTE: The PROCEDURE FREQ printed page 4.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.02 seconds
cpu time 0.03 seconds

96
97 OPTIONS LS=132 PS=79;

Return to Top

Print Sample of Continuation Round 3 Records

Obs DUPERSID PANEL RN JOBSN SUBTYPE STILLAT SICKPAY
1 70001101 20 3 1 1 1 -1
2 70004102 20 3 1 1 1 -1
3 70010101 20 3 2 1 1 -1
4 70010102 20 3 1 1 1 -1
5 70012102 20 3 1 1 1 -1
6 70012104 20 3 1 1 1 -1
7 70012105 20 3 1 1 1 -1
8 70013101 20 3 3 1 1 -1
9 70013103 20 3 1 1 1 -1
10 70014101 20 3 1 1 1 -1
11 70014102 20 3 1 1 1 -1
12 70015101 20 3 1 1 1 -1
13 70015102 20 3 2 1 1 -1
14 70016101 20 3 1 1 1 -1
15 70016102 20 3 1 1 1 -1
16 70018101 20 3 1 1 1 -1
17 70028101 20 3 1 1 1 -1
18 70030201 20 3 2 1 1 -1
19 70041101 20 3 1 1 1 -1
20 70041102 20 3 1 1 1 -1

Return to Top

Print Sample of Newly Reported Round 1 and Round 2 Records

Obs DUPERSID PANEL RN JOBSN SUBTYPE STILLAT SICKPAY
1 70001101 20 1 1 1 -1 2
2 70004102 20 1 1 1 -1 -1
3 70005101 20 1 1 1 -1 -7
4 70006101 20 1 1 1 -1 2
5 70006101 20 2 3 1 -1 2
6 70010101 20 1 1 1 -1 2
7 70010101 20 2 2 1 -1 2
8 70010102 20 1 1 1 -1 1
9 70010103 20 1 1 1 -1 2
10 70012102 20 1 1 1 -1 2
11 70012103 20 1 1 1 -1 -8
12 70012104 20 1 1 1 -1 2
13 70012105 20 2 1 1 -1 2
14 70013101 20 1 3 1 -1 1
15 70013103 20 1 1 1 -1 2
16 70014101 20 1 1 1 -1 -1
17 70014102 20 1 1 1 -1 -1
18 70015101 20 1 1 1 -1 2
19 70015102 20 1 1 1 -1 2
20 70015102 20 2 2 1 -1 2

Return to Top

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

DOES PERSON HAVE PAID SICK LEAVE

SICKPAY Frequency Percent Cumulative Frequency Cumulative Percent
-9 21 0.22 21 0.22
-8 303 3.22 324 3.45
-7 23 0.24 347 3.69
-1 974 10.36 1321 14.05
1 4401 46.82 5722 60.88
2 3677 39.12 9399 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 -9 14 0.22 14 0.22
-1 -8 180 2.77 194 2.98
-1 -7 11 0.17 205 3.15
-1 -1 758 11.66 963 14.81
-1 1 3337 51.32 4300 66.13
-1 2 2202 33.87 6502 100.00

Return To Top