Appendix 1. Sample SAS Program


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

NOTE: There were 55035 observations read from the data set JOBS17.JOBS17.
NOTE: The data set WORK.J17R3 has 5983 observations and 79 variables.
NOTE: Compressing data set WORK.J17R3 decreased size by 3.57 percent.
Compressed is 27 pages; un-compressed would require 28 pages.
NOTE: DATA statement used (Total process time):
real time 0.45 seconds
cpu time 0.06 seconds

38
39 proc print data=j17r3 (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.J17R3.
NOTE: The PROCEDURE PRINT printed page 1.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds

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

NOTE: There were 59068 observations read from the data set JOBS16.JOBS16.
NOTE: The data set WORK.J1612 has 8486 observations and 77 variables.
NOTE: Compressing data set WORK.J1612 decreased size by 5.13 percent.
Compressed is 37 pages; un-compressed would require 39 pages.
NOTE: DATA statement used (Total process time):
real time 0.56 seconds
cpu time 0.06 seconds

56
57 proc print data=j1612 (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.J1612.
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=j1612;
63 tables sickpay/list missing;
64 title 'Sickpay Value of FY2016 Round 1 and Round 2 Newly Reported CMJs';
65 run;

NOTE: There were 8486 observations read from the data set WORK.J1612.
NOTE: The PROCEDURE FREQ printed page 3.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.06 seconds
cpu time 0.00 seconds

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

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

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

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

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

NOTE: There were 5983 observations read from the data set WORK.J17R3.
NOTE: There were 8486 observations read from the data set WORK.J1612.
NOTE: The data set WORK.J17R3F has 5983 observations and 80 variables.
NOTE: Compressing data set WORK.J17R3F decreased size by 6.90 percent.
Compressed is 27 pages; un-compressed would require 29 pages.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

90
91 proc freq data=j17r3f;
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 5983 observations read from the data set WORK.J17R3F.
NOTE: The PROCEDURE FREQ printed page 4.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds

96

Return to Top

Print Sample of Continuation Round 3 Records

Obs DUPERSID PANEL RN JOBSN SUBTYPE STILLAT SICKPAY
1 10001101 21 3 1 1 1 -1
2 10001102 21 3 1 1 1 -1
3 10004101 21 3 1 1 1 -1
4 10005101 21 3 1 1 1 -1
5 10005102 21 3 1 1 1 -1
6 10008102 21 3 1 1 1 -1
7 10009101 21 3 1 1 1 -1
8 10010101 21 3 1 1 1 -1
9 10010102 21 3 1 1 1 -1
10 10014101 21 3 2 1 1 -1
11 10016101 21 3 1 1 1 -1
12 10016102 21 3 3 1 1 -1
13 10019103 21 3 1 1 1 -1
14 10022101 21 3 3 1 1 -1
15 10022102 21 3 1 1 1 -1
16 10023101 21 3 1 1 1 -1
17 10025102 21 3 1 1 1 -1
18 10028101 21 3 3 1 1 -1
19 10031101 21 3 1 1 1 -1
20 10031102 21 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 10001101 21 1 1 1 -1 1
2 10001102 21 1 1 1 -1 -1
3 10004101 21 1 1 1 -1 1
4 10005101 21 1 1 1 -1 2
5 10005102 21 1 1 1 -1 1
6 10006102 21 1 1 1 -1 1
7 10008102 21 2 1 1 -1 2
8 10008103 21 1 3 1 -1 2
9 10009101 21 1 1 1 -1 1
10 10010101 21 1 1 1 -1 -1
11 10010102 21 1 1 1 -1 1
12 10014101 21 1 2 1 -1 -1
13 10016101 21 1 1 1 -1 2
14 10016102 21 2 3 1 -1 2
15 10016201 21 1 1 1 -1 2
16 10016201 21 2 2 1 -1 2
17 10017101 21 1 1 1 -1 -1
18 10017102 21 2 1 1 -1 -8
19 10019103 21 2 1 1 -1 -8
20 10021101 21 1 1 1 -1 2

Return to Top

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

DOES PERSON HAVE PAID SICK LEAVE

SICKPAY Frequency Percent Cumulative Frequency Cumulative Percent
-9 16 0.19 16 0.19
-8 316 3.72 332 3.91
-7 19 0.22 351 4.14
-1 856 10.09 1207 14.22
1 4121 48.56 5328 62.79
2 3158 37.21 8486 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 11 0.18 11 0.18
-1 -8 194 3.24 205 3.43
-1 -7 10 0.17 215 3.59
-1 -1 684 11.43 899 15.03
-1 1 3189 53.30 4088 68.33
-1 2 1895 31.67 5983 100.00

Return To Top