Proc Report - Like Proc Freq?

Proc Report - Like Proc Freq?

Post by louis.lapr » Sat, 23 Aug 2003 00:40:19

HI Bruce,

Example 10 in the proc report online doc?


proc report data=grocery nowd headline;

column ('Individual Store Sales as a Percent of All Sales'
sector manager sales,(sum pctsum) comment);

define manager / group
define sector / group
define sales / format=dollar11.2
define sum / format=dollar9.2
'Total Sales';

define pctsum / 'Percent of Sales' format=percent6. width=8;
define comment / computed width=20 '' flow;

compute comment / char length=40;

if sales.pctsum gt .15 and _break_ = ' '
then comment='Sales substantially above expectations.';
else comment=' ';

rbreak after / ol summarize;

-----Oorspronkelijk bericht-----
Van: Bruce Johnson [mailto: XXXX@XXXXX.COM ]
Verzonden: donderdag 21 augustus 2003 16:49
Onderwerp: Proc Report - Like Proc Freq?

I would like to do something that seems to be very basic, but I can't find a
good example in the manual, and I didn't see anything in the archives (could
be a search error) so, here we go...

Proc report data=&dsname nowindows headline;
column quarter month dischgs percent;
define quarter / group "Quarter of Discharge";
define month / group "Month of Discharge";
define dischgs / sum "Number of Discharges";
define percent / computed "Monthly Percentage";

What I'm looking for is output that is similar to:

Proc freq data=&dsname;
tables quarter*month / list missing nocum;

So, I'd like to get a row percentage for each month in the report. Or would
I be better off running proc freq and outputting the result to a dataset and
running proc report on that?


Bruce A. Johnson
Senior Data Analyst
Solucient, LLC
(847) 440-9635

This message is a private communication. It may contain information that is
confidential and legally protected from disclosure. If you are not an
intended recipient, please do not read, copy or use this message or any
attachments, and do not disclose them to others.

Please notify the sender of the delivery error by replying to this message,
and then delete it and any attachments from your system. Thank you.
Solucient LLC.

Dit e-mailbericht is alleen bestemd voor de geadresseerden. Indien dit bericht niet voor u is bedoeld, wordt u verzocht de afzender hiervan
op de hoogte te stellen door het bericht te retourneren en de inhoud niet te gebruiken. Aan dit bericht geen rechten worden ontleend.
This e-mail message is intended to be exclusively for the addressee.
If you are not the intended recipient you are kindly requested not to
make any use whatsoever of the contents and to notify the sender
immediately by returning this e-mail message. No rights can be
derived from this message.

1. Do you prefer Proc Report or Proc Tabulate?Ans,If proc report,Would you Please explain?

2. tip: using Proc SQL to produce a Proc Freq out dataset; was:

> Subject: computing percentages in sql

this is from my R&D for an unpublished paper tenatively titled:

Advanced List Processing

Ron Fehd the SQL into:macro maven CDC Atlanta GA USA RJF2 at cdc dot

%Let InLibrefData = SAShelp.Class;
%Let InVar = Sex;
%*Let InLibrefData = SAShelp.Shoes;
%*Let InVar = Region;

PROC Freq data = &InLibrefData.;
tables &InVar.;

PROC SQL noprint;
select count(*)
into :Nrows
from &InLibrefData.;
create table &InVar.s as
select distinct(&InVar.) as Value
, count (&InVar.) as Count
, 100*(calculated
Count/&Nrows.) as Percent
from &InLibrefData.
group by &InVar.;
Proc Print data = &SysLast.;

I standardize the name of the InVar to Value

SUGI 24: 1999 Miami Beach FL
Posters 234 %FREQ1VAR
%FREQlVAR: Frequency of one variable with format:
a macro to standardize proc FREQ output data sets

3. how to get rid of missing values while doing proc freq and proc univariate?

4. Do I need to use proc summary before proc report for this report?

5. Can I specify order=data and order=freq in proc freq?

6. Convert VB.NET to TSQL PROC & Reference a Proc from another Proc

7. [PATCH] Proc: move proc fs hooks from cpuset.c to proc/fs/base.c

8. Convert VB.NET to TSQL PROC & Reference a Proc from another Proc

9. Proc Assoc, Proc dmdb and Proc rulegen

10. [PATCH] Proc: move proc fs hooks from cpuset.c to proc/fs/base.c

11. Convert VB.NET to TSQL PROC & Reference a Proc from another Proc

12. FS: ORIGIN 2000 128 Proc.,64 proc,32 proc.

13. whats the difference between proc tabulate and proc report

14. Questions on Proc Print/Proc Report

15. Delete some enties in proc tabulate or proc report how