1 The SAS System 12:00 Friday, February 18, 2005
NOTE: Copyright (c) 1999-2001 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software Release 8.2 (TS2M0)
/* APP03.sas */
1 OPTIONS LS=132 PS=79;
2
3 /****************************************************************************/
4 /* Program Name: SAMPLE.SAS */
5 /* */
6 /* Description: This job provides an example of how to get job info */
7 /* from Round 1 or Round 2 in the FY2002 JOBS file when */
8 /* a Round 3 current main job in the FY2003 JOBS file */
9 /* is a continuation job. */
10 /* */
11 /* This example creates a dataset of Round 3 continuation */
12 /* JOBS records with a SICKPAYX variable copied from the */
13 /* Round 1 or Round 2 newly reported job. */
14 /****************************************************************************/
15
16 libname jobs03 "c:\mydata\jobs03";
NOTE: Libref JOBS03 was successfully assigned as follows:
Engine: V8
Physical Name: c:\mydata\jobs03
17 libname jobs02 "c:\mydata\jobs02";
NOTE: Libref JOBS02 was successfully assigned as follows:
Engine: V8
Physical Name: c:\mydata\jobs03
18
19 /* Select continuing Panel 7, Round 3 Current Main JOBS */
20 /* (SUBTYPE=1, STILLAT=1) from the FY 2003 JOBS file and */
21 /* print selected variables from the first 20 observations */
22
23 data j03r3;
24 set jobs03.H74;
25 if panel=7
26 and rn=3
27 and subtype=1
28 and stillat=1
29 and sickpay=-1;
30 run;
NOTE: There were 56860 observations read from the data set JOBS03.H74.
NOTE: The data set WORK.J03R3 has 5889 observations and 87 variables.
NOTE: DATA statement used:
real time 3.62 seconds
cpu time 0.26 seconds
31
32 proc print data=j03r3 (obs=20);
33 title 'Print Sample of Continuation Round 3 Records';
34 var dupersid panel rn jobsn subtype stillat sickpay;
35 run;
NOTE: There were 20 observations read from the data set WORK.J03R3.
NOTE: The PROCEDURE PRINT printed page 1.
NOTE: PROCEDURE PRINT used:
real time 0.43 seconds
2 The SAS System 12:00 Friday, February 18, 2005
cpu time 0.04 seconds
36
37
38 /* Select newly reported Panel 7 Current Main JOBS records from */
39 /* the FY 2002 JOBS file and print selected variables from the */
40 /* first 20 observations. */
41
42 data j0212;
43 set jobs02.H63;
44 if subtype=1
45 and stillat=-1
46 and panel=7
47 and rn in (1,2);
48 run;
NOTE: There were 67028 observations read from the data set JOBS02.H63.
NOTE: The data set WORK.J0212 has 8293 observations and 87 variables.
NOTE: DATA statement used:
real time 2.54 seconds
cpu time 0.28 seconds
49
50 proc print data=j0212 (obs=20);
51 title 'Print Sample of Newly Reported Round 1 and Round 2 Records';
52 var dupersid panel rn jobsn subtype stillat sickpay;
53 run;
NOTE: There were 20 observations read from the data set WORK.J0212.
NOTE: The PROCEDURE PRINT printed page 2.
NOTE: PROCEDURE PRINT used:
real time 0.00 seconds
cpu time 0.00 seconds
54
55 proc freq data=j0212;
56 tables sickpay/list missing;
57 title 'Sickpay Value of FY2002 Round 1 and Round 2 Newly Reported CMJs';
58 run;
NOTE: There were 8293 observations read from the data set WORK.J0212.
NOTE: The PROCEDURE FREQ printed page 3.
NOTE: PROCEDURE FREQ used:
real time 0.07 seconds
cpu time 0.00 seconds
59
60
61 /* Prepare FY02 and FY03 data for merge */
62
63 proc sort data=j03r3;
64 by dupersid jobsn;
65 run;
NOTE: There were 5889 observations read from the data set WORK.J03R3.
NOTE: The data set WORK.J03R3 has 5889 observations and 87 variables.
NOTE: PROCEDURE SORT used:
real time 0.26 seconds
cpu time 0.14 seconds
66
67 proc sort data=j0212;
68 by dupersid jobsn;
69 run;
NOTE: There were 8293 observations read from the data set WORK.J0212.
NOTE: The data set WORK.J0212 has 8293 observations and 87 variables.
NOTE: PROCEDURE SORT used:
real time 0.23 seconds
cpu time 0.21 seconds
3 The SAS System 12:00 Friday, February 18, 2005
70
71
72 /* Create a dataset (J03R3F) that includes all variables */
73 /* for the continuation Round 3 Current Main JOBS and create */
74 /* the new variable SICKPAYX by copying SICKPAY from the */
75 /* corresponding Round 1 or Round 2 newly reported job record. */
76
77 data j03r3f;
78 merge j03r3 (in=a) j0212 (in=b keep = dupersid jobsn sickpay
79 rename=(sickpay=SICKPAYX));
80 by dupersid jobsn;
81 if a and b;
82 run;
NOTE: There were 5889 observations read from the data set WORK.J03R3.
NOTE: There were 8293 observations read from the data set WORK.J0212.
NOTE: The data set WORK.J03R3F has 5888 observations and 88 variables.
NOTE: DATA statement used:
real time 0.12 seconds
cpu time 0.12 seconds
83
84 proc freq data=j03r3f;
85 tables sickpay*sickpayx/list missing;
86 title1 'Diagnostic Post-Merge - Sickpay * Sickpayx';
87 title2 'Round 3 Continuation Current Main Jobs Only';
88 run;
NOTE: There were 5888 observations read from the data set WORK.J03R3F.
NOTE: The PROCEDURE FREQ printed page 4.
NOTE: PROCEDURE FREQ used:
real time 0.04 seconds
cpu time 0.00 seconds
89
90 OPTIONS LS=132 PS=79;
91
92 /******************************************************************/
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
real time 9.76 seconds
cpu time 1.49 seconds
Print Sample of Continuation Round 3 Records 12:00 Friday, February 18, 2005 1
Obs DUPERSID PANEL RN JOBSN SUBTYPE STILLAT SICKPAY
1 20002014 7 3 2 1 1 -1
2 20002068 7 3 2 1 1 -1
3 20003019 7 3 1 1 1 -1
4 20003026 7 3 1 1 1 -1
5 20003030 7 3 1 1 1 -1
6 20007016 7 3 1 1 1 -1
7 20007023 7 3 1 1 1 -1
8 20014017 7 3 1 1 1 -1
9 20015019 7 3 1 1 1 -1
10 20015026 7 3 1 1 1 -1
11 20016030 7 3 1 1 1 -1
12 20016047 7 3 1 1 1 -1
13 20016053 7 3 1 1 1 -1
14 20016065 7 3 1 1 1 -1
15 20021010 7 3 1 1 1 -1
16 20022039 7 3 1 1 1 -1
17 20025021 7 3 1 1 1 -1
18 20027010 7 3 1 1 1 -1
19 20029018 7 3 1 1 1 -1
20 20029025 7 3 1 1 1 -1
Print Sample of Newly Reported Round 1 and Round 2 Records 2
12:00 Friday, February 18, 2005
Obs DUPERSID PANEL RN JOBSN SUBTYPE STILLAT SICKPAY
1 20002014 7 1 1 1 -1 2
2 20002014 7 2 2 1 -1 2
3 20002068 7 1 1 1 -1 2
4 20002068 7 2 2 1 -1 2
5 20003019 7 1 1 1 -1 -1
6 20003026 7 1 1 1 -1 2
7 20003030 7 1 1 1 -1 2
8 20007016 7 1 1 1 -1 1
9 20007023 7 1 1 1 -1 1
10 20013017 7 1 1 1 -1 2
11 20014017 7 1 1 1 -1 1
12 20015019 7 1 1 1 -1 1
13 20015026 7 1 1 1 -1 1
14 20016013 7 2 1 1 -1 2
15 20016016 7 1 1 1 -1 -1
16 20016030 7 1 1 1 -1 2
17 20016047 7 1 1 1 -1 -9
18 20016053 7 1 1 1 -1 2
19 20016065 7 1 1 1 -1 2
20 20021010 7 1 1 1 -1 1
Sickpay Value of FY2002 Round 1 and Round 2 Newly Reported CMJs 3
12:00 Friday, February 18, 2005
The FREQ Procedure
DOES PERSON HAVE PAID SICK LEAVE
Cumulative Cumulative
SICKPAY Frequency Percent Frequency Percent
------------------------------------------------------------
-9 16 0.19 16 0.19
-8 198 2.39 214 2.58
-7 8 0.10 222 2.68
-1 956 11.53 1178 14.20
1 3883 46.82 5061 61.03
2 3232 38.97 8293 100.00
Diagnostic Post-Merge - Sickpay * Sickpayx 12:00 Friday, February 18, 2005 4
Round 3 Continuation Current Main Jobs Only
The FREQ Procedure
Cumulative Cumulative
SICKPAY SICKPAYX Frequency Percent Frequency Percent
------------------------------------------------------------------------
-1 -9 10 0.17 10 0.17
-1 -8 116 1.97 126 2.14
-1 -7 6 0.10 132 2.24
-1 -1 751 12.75 883 15.00
-1 1 3107 52.77 3990 67.76
-1 2 1898 32.24 5888 100.00