I need to get the same output from the attached code sample but need to eliminate the remerging summary data note in the log, is there a way this can be done? I am testing in SAS Enterprise Guide 6.1 running on SAS GRID environment but code will ultimately be executed from a unix shell script.
Sample Code:
data have ;
input wod mmddyy10. type $ rptid $ sum_errors sum_denom ;
cards;
12/20/2015 CARS RPT1 123 456
12/20/2015 CARS RPT2 0 178
12/20/2015 CARS RPT3 0 1029
12/20/2015 CACARS RPT1 0 1848
12/20/2015 CACARS RPT2 0 2558
12/20/2015 CACARS RPT3 0 86
12/21/2015 CARS RPT1 0 654
12/21/2015 CARS RPT2 1 781
12/21/2015 CARS RPT3 1 219
12/21/2015 CACARS RPT1 1 1484
12/21/2015 CACARS RPT2 1 8255
12/21/2015 CACARS RPT3 1 98
12/22/2015 CARS RPT1 10 654
12/22/2015 CARS RPT2 12 871
12/22/2015 CARS RPT3 11 129
12/22/2015 CACARS RPT1 5 1484
12/22/2015 CACARS RPT2 10 255
12/22/2015 CACARS RPT3 7 68
run;
/* creates the max and min of errors and denom */ /*remerging note on this table*/
PROC SQL;
create table xyz_3day_max_min as
select wod, type, rptid,
MAX(sum_errors) as max_errs,
MIN(sum_errors) as min_errs,
MAX(sum_denom) as max_denom,
MIN(sum_denom) as min_denom
from have
group by 2,3
order by 1,2,3;
quit;
/* consolidates above table to one record per report */
proc sql;
create table xyz_max_min as
select distinct type, rptid, max_errs, min_errs, max_denom, min_denom
from xyz_3day_max_min
;
quit;
LOG:
NOTE: The data set WORK.HAVE has 18 observations and 5 variables.
NOTE: Compressing data set WORK.HAVE increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
44 run;
45
46
47 /* creates the max and min of errors and denom */ /*remerging note on this table*/
48 PROC SQL;
49 create table xyz_3day_max_min as
50 select wod, type, rptid,
51 MAX(sum_errors) as max_errs,
52 MIN(sum_errors) as min_errs,
53 MAX(sum_denom) as max_denom,
54 MIN(sum_denom) as min_denom
55 from have
56 group by 2,3
57 order by 1,2,3;
NOTE: The query requires remerging summary statistics back with the original data.
NOTE: Compressing data set WORK.XYZ_3DAY_MAX_MIN increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: Table WORK.XYZ_3DAY_MAX_MIN created, with 18 rows and 7 columns.
58
59 quit;
NOTE: PROCEDURE SQL used (Total process time):
real time 0.03 seconds
2 The SAS System 11:56 Monday, March 28, 2016
cpu time 0.02 seconds
60
61 /* consolidates above table to one record per report */
62 proc sql;
63 create table xyz_max_min as
64 select distinct type, rptid, max_errs, min_errs, max_denom, min_denom
65 from xyz_3day_max_min
66 ;
NOTE: Compressing data set WORK.XYZ_MAX_MIN increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: Table WORK.XYZ_MAX_MIN created, with 6 rows and 6 columns.
67 quit;
NOTE: PROCEDURE SQL used (Total process time):
real time 0.02 seconds
cpu time 0.00 seconds
Thanks,
Elliott
... View more