```Date: Mon, 26 Jun 2006 08:06:40 -0700 Reply-To: Irin later Sender: "SAS(r) Discussion" From: Irin later Subject: Re: Proc Freq with BY option for break down; Sum function for total amnt Comments: To: toby dunn In-Reply-To: Content-Type: text/plain; charset=iso-8859-1 Toby, thank you very much! It works now except one problem-it cuts one digit at the end for really huge ammount For example, as a result of calculations I got SumAllow_Amt =200141425 While it should be =2001414254 So I wonder how I can assign a wider length of the result field SumAllow_Amt I mean…I know that if it would be in a data set I would put: Length SumAllow_Amt \$ 20 However I have no idea how to incorporate it into the syntax: Proc summary data = HMOdol; class tos; var allow_amt; output out = out.TosHMOdol N(Allow_Amt) = NAllow_Amt Min(Allow_Amt) = MinAllow_Amt Max(Allow_Amt) = MaxAllow_Amt Sum(Allow_Amt) = SumAllow_Amt ; run ; Could you please give me a hand? Thank you for all your help! Irin toby dunn wrote: Irin , Title "Distribution of Dollars by Product" ; Proc summary data = out.allclaims ; class Product ; var allow_amt ; output out = NewData N(Allow_Amt) = NAllow_Amt Min(Allow_Amt) = MinAllow_Amt Max(Allow_Amt) = MaxAllow_Amt Sum(Alow_Amt) = SumAllow_Amt ; run ; Toby Dunn From: Irin later Reply-To: Irin later To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Proc Freq with BY option for break down; Sum function for total amnt Date: Fri, 23 Jun 2006 08:45:10 -0700 Toby, Thank you very much. It works now. However it generates just N ,Min, max, mean and std. while I also need sum of allow_amt field How can I do it? Thank you ! Irin toby dunn wrote: irin , Not your fault mine, I was typeing too fast: Title "Distribution of Dollars by Product" ; Proc summary data = out.allclaims ; class Product ; var allow_amt ; output out = NewData ; run ; Toby Dunn From: Irin later To: toby dunn , SAS-L@LISTSERV.UGA.EDU Subject: Re: Proc Freq with BY option for break down; Sum function for total amnt Date: Fri, 23 Jun 2006 06:59:42 -0700 (PDT) Toby, I used the following code : Proc summary data = out.allclaims Nowd ; class Product; var allow_amt; title "Distribution of Dollars by Product"; run ; ….and I got the following error log. What I am doing wrong? Thank you in advance, Irin ! 56 ************************************************************************ 57 ** Part1: Distribution of Dollars by Product ** 58 ************************************************************************; 59 Proc summary 60 data = out.allclaims Nowd ; ____ _ ____ _ ____ _ 22 200 22 200 22 200 ERROR 22-322: Syntax error, expecting one of the following: ;, (, ALPHA, CHARTYPE, CLASSDATA, CLM, COMPLETETYPES, CSS, CV, DATA, DESCEND, DESCENDING, DESCENDTYPES, EXCLNPWGT, EXCLNPWGTS, EXCLUSIVE, FW, IDMIN, KURTOSIS, LCLM, MAX, MAXDEC, MEAN, MEDIAN, ERROR 22-322: Syntax error, expecting one of the following: ;, (, ALPHA, CHARTYPE, CLASSDATA, CLM, COMPLETETYPES, CSS, CV, DATA, DESCEND, DESCENDING, DESCENDTYPES, EXCLNPWGT, EXCLNPWGTS, EXCLUSIVE, FW, IDMIN, KURTOSIS, LCLM, MAX, MAXDEC, MEAN, MEDIAN, ERROR 22-322: Syntax error, expecting one of the following: ;, (, ALPHA, CHARTYPE, CLASSDATA, CLM, COMPLETETYPES, CSS, CV, DATA, DESCEND, DESCENDING, DESCENDTYPES, EXCLNPWGT, EXCLNPWGTS, EXCLUSIVE, FW, IDMIN, KURTOSIS, LCLM, MAX, MAXDEC, MEAN, MEDIAN, MIN, MISSING, N, NDEC, NMISS, NONOBS, NOPRINT, NOTRAP, NWAY, ORDER, P1, P10, P25, P5, P50, P75, P90, P95, P99, PCTLDEF, PRINT, PRINTALL, PRINTALLTYPES, PRINTIDS, PRINTIDVARS, PROBT, Q1, Q3, QMARKERS, QMETHOD, QNTLDEF, QRANGE, RANGE, MIN, MISSING, N, NDEC, NMISS, NONOBS, NOPRINT, NOTRAP, NWAY, ORDER, P1, P10, P25, P5, P50, P75, P90, P95, P99, PCTLDEF, PRINT, PRINTALL, PRINTALLTYPES, PRINTIDS, PRINTIDVARS, PROBT, Q1, Q3, QMARKERS, QMETHOD, QNTLDEF, QRANGE, RANGE, MIN, MISSING, N, NDEC, NMISS, NONOBS, NOPRINT, NOTRAP, NWAY, ORDER, P1, P10, P25, P5, P50, P75, P90, P95, P99, PCTLDEF, PRINT, PRINTALL, PRINTALLTYPES, PRINTIDS, PRINTIDVARS, PROBT, Q1, Q3, QMARKERS, QMETHOD, QNTLDEF, QRANGE, RANGE, SKEWNESS, STDDEV, STDERR, SUM, SUMSIZE, SUMWGT, T, UCLM, USS, VAR, VARDEF. SKEWNESS, STDDEV, STDERR, SUM, SUMSIZE, SUMWGT, T, UCLM, USS, VAR, VARDEF. SKEWNESS, STDDEV, STDERR, SUM, SUMSIZE, SUMWGT, T, UCLM, USS, VAR, VARDEF. ERROR 200-322: The symbol is not recognized and will be ignored. ERROR 200-322: The symbol is not recognized and will be ignored. ERROR 200-322: The symbol is not recognized and will be ignored. 61 class Product; 62 var allow_amt; 63 title "Distribution of Dollars by Product"; 64 run ; toby dunn wrote: Irin , Proc summary data = XXX Nowd ; class Age ; var Amount ; format Age AgeFMT. ; run ; Toby Dunn From: Irin later Reply-To: Irin later To: SAS-L@LISTSERV.UGA.EDU Subject: Proc Freq with BY option for break down; Sum function for total amnt Date: Thu, 22 Jun 2006 12:14:41 -0700 I have a list of patients of different age and a certain dollar amount is assigned to each of them I need to break down a total dollar amount by age category In other words I need to know what is the total dollars amount for each age category Amnt agecat 926.84 “0-18” 1000.12 “19-34” 2300.36 “ >=35” I wonder if I can use Proc Freq for this purpose. Try as I might I was unable to find an appropriate syntax: how to use By option and if I can use sum function in such a case like sum(amnt) Thank you in advance Irin --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. --------------------------------- How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates. --------------------------------- Why keep checking for Mail? The all-new Yahoo! Mail Beta shows you when there are new messages. ```

Back to: Top of message | Previous page | Main SAS-L page