1 The SAS System 13:44 Monday, February 20, 2006
NOTE: Copyright (c) 1999-2001 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software Release 8.2 (TS2M0)
1 /* APP04.sas */
2
3 OPTIONS LS=132 PS=79;
4
5 /*******************************************************************************/
6 /* Program Name: SAMPLE.SAS */
7 /* */
8 /* Description: This job provides an example of how to get job info */
9 /* from Round 1 or Round 2 in the FY2003 JOBS file when */
10 /* a Round 3 current main job in the FY2004 JOBS file */
11 /* is a continuation job. */
12 /* */
13 /* This example creates a dataset of Round 3 continuation */
14 /* JOBS records with a SICKPAYX variable copied from the */
15 /* Round 1 or Round 2 newly reported job.*/
16 /********************************************************************************/
17
18 libname jobs04 "c:\mydata\jobs04";
NOTE: Libref JOBS04 was successfully assigned as follows:
Engine: V8
Physical Name: c:\mydata\jobs04
19 libname jobs03 "c:\mydata\jobs03";
NOTE: Libref JOBS03 was successfully assigned as follows:
Engine: V8
Physical Name: c:\mydata\jobs03
20
21 /* Select continuing Panel 8, Round 3 Current Main JOBS */
22 /* (SUBTYPE=1, STILLAT=1) from the FY 2004 JOBS file and */
23 /* print selected variables from the first 20 observations */
24
25 data j04r3;
26 set jobs04.H83;
27 if panel=8
28 and rn=3
29 and subtype=1
30 and stillat=1
31 and sickpay=-1;
32 run;
NOTE: There were 57228 observations read from the data set JOBS04.H83.
NOTE: The data set WORK.J04R3 has 6061 observations and 87 variables.
NOTE: DATA statement used:
real time 3.32 seconds
cpu time 0.21 seconds
33
34 proc print data=j04r3 (obs=20);
35 title 'Print Sample of Continuation Round 3 Records';
36 var dupersid panel rn jobsn subtype stillat sickpay;
37 run;
NOTE: There were 20 observations read from the data set WORK.J04R3.
2 The SAS System 13:44 Monday, February 20, 2006
NOTE: The PROCEDURE PRINT printed page 1.
NOTE: PROCEDURE PRINT used:
real time 0.34 seconds
cpu time 0.01 seconds
38
39
40 /* Select newly reported Panel 8 Current Main JOBS records from */
41 /* the FY 2003 JOBS file and print selected variables from the */
42 /* first 20 observations. */
43
44 data j0312;
45 set jobs03.H74;
46 if subtype=1
47 and stillat=-1
48 and panel=8
49 and rn in (1,2);
50 run;
NOTE: There were 56860 observations read from the data set JOBS03.H74.
NOTE: The data set WORK.J0312 has 8522 observations and 87 variables.
NOTE: DATA statement used:
real time 2.73 seconds
cpu time 0.31 seconds
51
52 proc print data=j0312 (obs=20);
53 title 'Print Sample of Newly Reported Round 1 and Round 2 Records';
54 var dupersid panel rn jobsn subtype stillat sickpay;
55 run;
NOTE: There were 20 observations read from the data set WORK.J0312.
NOTE: The PROCEDURE PRINT printed page 2.
NOTE: PROCEDURE PRINT used:
real time 0.01 seconds
cpu time 0.01 seconds
56
57 proc freq data=j0312;
58 tables sickpay/list missing;
59 title 'Sickpay Value of FY2003 Round 1 and Round 2 Newly Reported CMJs';
60 run;
NOTE: There were 8522 observations read from the data set WORK.J0312.
NOTE: The PROCEDURE FREQ printed page 3.
NOTE: PROCEDURE FREQ used:
real time 0.09 seconds
cpu time 0.04 seconds
61
62
63 /* Prepare FY03 and FY04 data for merge */
64
65 proc sort data=j04r3;
66 by dupersid jobsn;
67 run;
NOTE: There were 6061 observations read from the data set WORK.J04R3.
NOTE: The data set WORK.J04R3 has 6061 observations and 87 variables.
NOTE: PROCEDURE SORT used:
real time 0.25 seconds
cpu time 0.17 seconds
68
69 proc sort data=j0312;
70 by dupersid jobsn;
71 run;
NOTE: There were 8522 observations read from the data set WORK.J0312.
NOTE: The data set WORK.J0312 has 8522 observations and 87 variables.
NOTE: PROCEDURE SORT used:
real time 0.25 seconds
3 The SAS System 13:44 Monday, February 20, 2006
cpu time 0.23 seconds
72
73
74 /* Create a dataset (J04R3F) that includes all variables */
75 /* for the continuation Round 3 Current Main JOBS and create */
76 /* the new variable SICKPAYX by copying SICKPAY from the */
77 /* corresponding Round 1 or Round 2 newly reported job record. */
78
79 data j04r3f;
80 merge j04r3 (in=a) j0312 (in=b keep = dupersid jobsn sickpay
81 rename=(sickpay=SICKPAYX));
82 by dupersid jobsn;
83 if a and b;
84 run;
NOTE: There were 6061 observations read from the data set WORK.J04R3.
NOTE: There were 8522 observations read from the data set WORK.J0312.
NOTE: The data set WORK.J04R3F has 6060 observations and 88 variables.
NOTE: DATA statement used:
real time 0.15 seconds
cpu time 0.14 seconds
85
86 proc freq data=j04r3f;
87 tables sickpay*sickpayx/list missing;
88 title1 'Diagnostic Post-Merge - Sickpay * Sickpayx';
89 title2 'Round 3 Continuation Current Main Jobs Only';
90 run;
NOTE: There were 6060 observations read from the data set WORK.J04R3F.
NOTE: The PROCEDURE FREQ printed page 4.
NOTE: PROCEDURE FREQ used:
real time 0.06 seconds
cpu time 0.01 seconds
91
92 OPTIONS LS=132 PS=79;
93
94 /******************************************************************/
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
real time 10.45 seconds
cpu time 1.65 seconds
Print Sample of Continuation Round 3 Records 13:44 Monday, February 20, 2006 1
Obs DUPERSID PANEL RN JOBSN SUBTYPE STILLAT SICKPAY
1 90001012 8 3 1 1 1 -1
2 90002017 8 3 1 1 1 -1
3 90002024 8 3 1 1 1 -1
4 90003018 8 3 1 1 1 -1
5 90003025 8 3 1 1 1 -1
6 90005023 8 3 1 1 1 -1
7 90007015 8 3 1 1 1 -1
8 90007022 8 3 1 1 1 -1
9 90009012 8 3 1 1 1 -1
10 90009029 8 3 1 1 1 -1
11 90010012 8 3 1 1 1 -1
12 90012011 8 3 1 1 1 -1
13 90014012 8 3 1 1 1 -1
14 90016015 8 3 1 1 1 -1
15 90016022 8 3 1 1 1 -1
16 90020028 8 3 1 1 1 -1
17 90022015 8 3 1 1 1 -1
18 90023018 8 3 1 1 1 -1
19 90023025 8 3 1 1 1 -1
20 90023043 8 3 1 1 1 -1
Print Sample of Newly Reported Round 1 and Round 2 Records 2
13:44 Monday, February 20, 2006
Obs DUPERSID PANEL RN JOBSN SUBTYPE STILLAT SICKPAY
1 90001012 8 1 1 1 -1 2
2 90002017 8 1 1 1 -1 1
3 90002024 8 1 1 1 -1 1
4 90003018 8 1 1 1 -1 2
5 90003025 8 2 1 1 -1 2
6 90004013 8 1 1 1 -1 2
7 90005016 8 1 1 1 -1 1
8 90005023 8 1 1 1 -1 1
9 90007015 8 1 1 1 -1 1
10 90007022 8 1 1 1 -1 1
11 90009012 8 1 1 1 -1 1
12 90009029 8 1 1 1 -1 1
13 90010012 8 2 1 1 -1 2
14 90010029 8 1 1 1 -1 2
15 90012011 8 1 1 1 -1 2
16 90014012 8 1 1 1 -1 2
17 90016015 8 1 1 1 -1 1
18 90016022 8 1 1 1 -1 2
19 90020028 8 1 1 1 -1 1
20 90020035 8 1 1 1 -1 2
Sickpay Value of FY2003 Round 1 and Round 2 Newly Reported CMJs 3
13:44 Monday, February 20, 2006
The FREQ Procedure
DOES PERSON HAVE PAID SICK LEAVE
Cumulative Cumulative
SICKPAY Frequency Percent Frequency Percent
------------------------------------------------------------
-9 10 0.12 10 0.12
-8 210 2.46 220 2.58
-7 5 0.06 225 2.64
-1 933 10.95 1158 13.59
1 3929 46.10 5087 59.69
2 3435 40.31 8522 100.00
Diagnostic Post-Merge - Sickpay * Sickpayx 13:44 Monday, February 20, 2006 4
Round 3 Continuation Current Main Jobs Only
The FREQ Procedure
Cumulative Cumulative
SICKPAY SICKPAYX Frequency Percent Frequency Percent
------------------------------------------------------------------------
-1 -9 7 0.12 7 0.12
-1 -8 128 2.11 135 2.23
-1 -7 3 0.05 138 2.28
-1 -1 732 12.08 870 14.36
-1 1 3161 52.16 4031 66.52
-1 2 2029 33.48 6060 100.00