Hi everyone,
Is there a way to suppress a proc report program? I'm currently using proc report to create a quick dataset and would rather not have it print. It would be similar to a noprint option in proc freq. Here is my current code:
proc report data=Johanna17 completerows nowd out=JohannaBase ;
column childid childstatus zipcode timeinprogram RefftoAssesdays FiscalYear;
run;
Thank you!
@hwangnyc wrote:
Hi everyone,
Is there a way to suppress a proc report program? I'm currently using proc report to create a quick dataset and would rather not have it print. It would be similar to a noprint option in proc freq. Here is my current code:
proc report data=Johanna17 completerows nowd out=JohannaBase ;
column childid childstatus zipcode timeinprogram RefftoAssesdays FiscalYear;
run;
Thank you!
Are there any summaries from that or are you just selecting variables?
define column_name/noprint; for all the columns, But, why not PROC SQL or DATA Step to create the required table.
Check the below code both PROC REPORT and PROC SQL create same table
data grocery;
input Sector $ Manager $ Department $ Sales @@;
datalines;
se 1 np1 50 se 1 p1 100 se 1 np2 120 se 1 p2 80
se 2 np1 40 se 2 p1 300 se 2 np2 220 se 2 p2 70
nw 3 np1 60 nw 3 p1 600 nw 3 np2 420 nw 3 p2 30
nw 4 np1 45 nw 4 p1 250 nw 4 np2 230 nw 4 p2 73
nw 9 np1 45 nw 9 p1 205 nw 9 np2 420 nw 9 p2 76
sw 5 np1 53 sw 5 p1 130 sw 5 np2 120 sw 5 p2 50
sw 6 np1 40 sw 6 p1 350 sw 6 np2 225 sw 6 p2 80
ne 7 np1 90 ne 7 p1 190 ne 7 np2 420 ne 7 p2 86
ne 8 np1 200 ne 8 p1 300 ne 8 np2 420 ne 8 p2 125
;
run;
proc report data=grocery nowd
out=temp(drop=_break_);
column manager sales;
define manager / group noprint;
define sales / analysis sum noprint;
run;
proc sql;
create table test as
select Manager,sum(sales) as sales
from grocery
group by manager;
quit;
Does this give you want you want?
ods _all_ close;
proc report data=sashelp.class out=work.class; run; quit;
Vince DelGobbo
SAS R&D
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: