BookmarkSubscribeRSS Feed
hwangnyc
Quartz | Level 8

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!

 

 

4 REPLIES 4
ballardw
Super User

@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?

SuryaKiran
Meteorite | Level 14

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;

 

Thanks,
Suryakiran
Vince_SAS
Rhodochrosite | Level 12

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

DrAbhijeetSafai
Pyrite | Level 9
Good one! Thanks.
Dr. Abhijeet Safai
Certified Base and Clinical SAS Programmer
Associate Data Analyst
Actu-Real

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 7552 views
  • 2 likes
  • 5 in conversation