Appendix 1. Sample SAS Program


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

NOTE: There were 60674 observations read from the data set JOBS15.JOBS15.
NOTE: The data set WORK.J15R3 has 6081 observations and 77 variables.
NOTE: Compressing data set WORK.J15R3 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.76 seconds
cpu time 0.01 seconds

38
39 proc print data=j15r3 (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.J15R3.
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 19 Current Main JOBS records from */
46 /* the FY 2014 JOBS file and print selected variables from the */
47 /* first 20 observations. */
48
49 data j1412;
50 set jobs14.jobs14;
51 if subtype=1
52 and stillat=-1
53 and panel=19
54 and rn in (1,2);
55 run;

NOTE: There were 58697 observations read from the data set JOBS14.JOBS14.
NOTE: The data set WORK.J1412 has 8573 observations and 77 variables.
NOTE: Compressing data set WORK.J1412 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.68 seconds
cpu time 0.12 seconds

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

NOTE: There were 8573 observations read from the data set WORK.J1412.
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 FY14 and FY15 data for merge */
69
70 proc sort data=j15r3;
71 by dupersid jobsn;
72 run;

NOTE: There were 6081 observations read from the data set WORK.J15R3.
NOTE: SAS sort was used.
NOTE: The data set WORK.J15R3 has 6081 observations and 77 variables.
NOTE: Compressing data set WORK.J15R3 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.10 seconds
cpu time 0.01 seconds

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

NOTE: There were 8573 observations read from the data set WORK.J1412.
NOTE: SAS sort was used.
NOTE: The data set WORK.J1412 has 8573 observations and 77 variables.
NOTE: Compressing data set WORK.J1412 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.03 seconds
cpu time 0.03 seconds

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

NOTE: There were 6081 observations read from the data set WORK.J15R3.
NOTE: There were 8573 observations read from the data set WORK.J1412.
NOTE: The data set WORK.J15R3F has 6080 observations and 78 variables.
NOTE: Compressing data set WORK.J15R3F 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.03 seconds
cpu time 0.03 seconds

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

96
97 OPTIONS LS=132 PS=79;
98
99

Return to Top

Print Sample of Continuation Round 3 Records

Obs DUPERSID PANEL RN JOBSN SUBTYPE STILLAT SICKPAY
1 60001103 19 3 1 1 1 -1
2 60001104 19 3 1 1 1 -1
3 60002101 19 3 1 1 1 -1
4 60002102 19 3 1 1 1 -1
5 60003102 19 3 1 1 1 -1
6 60004101 19 3 2 1 1 -1
7 60004102 19 3 1 1 1 -1
8 60009101 19 3 1 1 1 -1
9 60010106 19 3 1 1 1 -1
10 60011101 19 3 1 1 1 -1
11 60011102 19 3 2 1 1 -1
12 60015101 19 3 1 1 1 -1
13 60016101 19 3 1 1 1 -1
14 60019101 19 3 1 1 1 -1
15 60019102 19 3 1 1 1 -1
16 60020101 19 3 1 1 1 -1
17 60021102 19 3 3 1 1 -1
18 60022101 19 3 1 1 1 -1
19 60026102 19 3 1 1 1 -1
20 60026103 19 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 60001103 19 1 1 1 -1 1
2 60001104 19 2 1 1 -1 1
3 60002101 19 1 1 1 -1 1
4 60002102 19 1 1 1 -1 2
5 60003101 19 1 1 1 -1 1
6 60003102 19 1 1 1 -1 1
7 60004101 19 1 1 1 -1 1
8 60004101 19 2 2 1 -1 1
9 60004102 19 2 1 1 -1 1
10 60009101 19 1 1 1 -1 -8
11 60010106 19 1 1 1 -1 2
12 60011101 19 1 1 1 -1 -1
13 60011102 19 1 1 1 -1 1
14 60011102 19 2 2 1 -1 -1
15 60015101 19 1 1 1 -1 1
16 60016101 19 1 1 1 -1 -1
17 60019101 19 1 1 1 -1 1
18 60019102 19 1 1 1 -1 1
19 60020101 19 1 1 1 -1 1
20 60021102 19 1 3 1 -1 -1

Return to Top

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

DOES PERSON HAVE PAID SICK LEAVE

SICKPAY Frequency Percent Cumulative Frequency Cumulative Percent
-9 10 0.12 10 0.12
-8 286 3.34 296 3.45
-7 13 0.15 309 3.60
-1 824 9.61 1133 13.22
1 3831 44.69 4964 57.90
2 3609 42.10 8573 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 8 0.13 8 0.13
-1 -8 185 3.04 193 3.17
-1 -7 7 0.12 200 3.29
-1 -1 636 10.46 836 13.75
-1 1 3031 49.85 3867 63.60
-1 2 2213 36.40 6080 100.00

Return To Top