The SAS Output Delivery System and reporting techniques

Beginner's report.

Reply
N/A
Posts: 0

Beginner's report.

I am a SAS beginner.
I have a SAS data table with columns:

Identity (X?....?)
Gender (1,2)
Class (1,2)
Mark (1,2,3,4,5)

Variable Mark is numeric, the remaining of character type.

I want to create a summary report with PROC REPORT.

On the first line I would like to have the table total numbers for men(1), women(2) and total.
On the third line Class 1 numbers.
On lines 4-8 the number of individuals in Class 1 with different marks.

On lines 10-15 Class 2 in the same way as Class 1.


If I could get some help I would be most grateful.
Best regards
Anne
SAS Super FREQ
Posts: 8,743

Re: Beginner's report.

Hi:
I don't understand what you mean by "class 1 numbers on third line" the rest of the description is clear.

cynthia
N/A
Posts: 0

Re: Beginner's report.

Cynthia,

I meant the sum of individuals (the number of individuals) in Class 1.

Bad english by me. Where I come from we talk rotvälska all the time.

Anne
Frequent Contributor
Posts: 81

Re: Beginner's report.

Anne,

Is this what you are looking for?

PROC REPORT DATA=table NOWD;
COLUMNS class identity mark gender,(N) overall;
DEFINE class / GROUP;
DEFINE identity / GROUP;
DEFINE mark / GROUP;
DEFINE gender / ACROSS;
DEFINE overall / COMPUTED;
COMPUTE overall;
overall = SUM(_c5_, _c6_);
ENDCOMP;
BREAK BEFORE class / SUMMARIZE;
RBREAK BEFORE / SUMMARIZE;
RUN;

...............Phil
N/A
Posts: 0

Re: Beginner's report.

Thank you very much, Phil.

Your example seems useful. I am working on it.

Anne
Ask a Question
Discussion stats
  • 4 replies
  • 132 views
  • 0 likes
  • 3 in conversation