Date: Fri, 25 Feb 2000 18:10:19 -0800
Reply-To: Robert Virgile <virgile@MEDIAONE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Robert Virgile <virgile@MEDIAONE.NET>
Subject: Re: report for frequency data
Content-Type: text/plain; charset=us-ascii
Here was the original intent (plus the nonworking program):
VARIABLE A B C
-------------------------------------------------
001 3 0 0
002 1 2 0
003 1 1 1
004 0 2 1
005 0 0 3
DATA ALPH_IN;
INPUT (A1-A5) ($CHAR1.);
CARDS;
AAABC
ABBBC
ABCCC
;
PROC FREQ DATA=ALPH_IN;
TABLES A1-A5/OUT=FREQOUT;
PROC PRINT DATA=FREQOUT;
/* only A5 in the output file */
RUN;
If you have control over your incoming data, here is a simple method
(untested):
DATA ALPH_IN;
Do Variable=1 to 5;
INPUT @Variable A $char1. @;
output;
end;
CARDS;
AAABC
ABBBC
ABCCC
;
PROC FREQ DATA=ALPH_IN;
TABLES Variable*A;
format variable z3.;
RUN;
Of course, if you want to make an output data set you could ... but it
would not contain cells with a count of zero (at least not in version 6
of the software).
Good luck.
Bob V.