Date: Thu, 5 Aug 2010 17:59:41 0400
ReplyTo: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SASL@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: Proc SUMMARY output dataset
I think that some of the answers were documented in the following SUGI
paper: http://www2.sas.com/proceedings/sugi26/p07326.pdf
Art

On Thu, 5 Aug 2010 15:50:13 0500, Data _null_; <iebupdte@GMAIL.COM> wrote:
>I think I just tried it. You and I have discussed this in the year or
>so as I recall. I will try to find the thread.
>
>Another thing I find interesting is the ability to label statements.
>
>599 Richard:options notes=1;
>600 DeVenezia:
>600! proc print data=sashelp.class;
>601 James:format abcd: f10.;
>602 Goodnight:run;
>
>NOTE: There were 19 observations read from the data set SASHELP.CLASS.
>
>But I haven't figured out how to use that, other than documentation.
>
>On 8/5/10, Richard DeVenezia <rdevenezia@gmail.com> wrote:
>> Data _null_:
>>
>> > NOINHERIT does work but If you want the statistics to have specific
>> > formats you can do it. But to suppress a warning you need to involve
the
>> > colon (:) .
>>
>> That is one neat trick.
>>
>> One must infer that a FORMAT with a shortcut selector (Shortcut for
>> Specifying Lists of Variable Names)
>>
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.
htm#/documentation/cdl/en/proc/61895/HTML/default/a000060410.htm
>> is evaluated and applied to both the input and output datasets or an
>> internal Proc Data Vector.
>>
>> Curiosity begs the question; where did you come up with it? and how
>> many more unexplored nooks and crannies are there in the Proc grammars
>> ?
>>
>> 
>> Richard A. DeVenezia
>>
>> On Thu, Aug 5, 2010 at 3:07 PM, Data _null_; <iebupdte@gmail.com> wrote:
>> > NOINHERIT does work but If you want the statistics to have specific
>> > formats you can do it. But to suppress a warning you need to involve
the
>> > :.
>> >
>> > proc summary data=sashelp.shoes;
>> > output out=test
>> > sum(Stores Sales Inventory Returns)
>> > = Stores_sum Sales_sum Inventory_sum Returns_sum;
>> > format Stores_sum: F10. Sales_sum: Best12. Inventory_sum:
>> > Returns_sum: comma20.;
>> > run;
>> > proc contents order=varnum;
>> > run;
>> > proc print;
>> > run;
>> >
>> > # Variable Type Len Format Informat Label
>> >
>> > 1 _TYPE_ Num 8
>> > 2 _FREQ_ Num 8
>> > 3 Stores_sum Num 8 F10. Number
of Stores
>> > 4 Sales_sum Num 8 BEST12. DOLLAR12. Total
Sales
>> > 5 Inventory_sum Num 8 COMMA20. DOLLAR12. Total
Inventory
>> > 6 Returns_sum Num 8 COMMA20. DOLLAR12. Total
Returns
>> >
>> >
>> >
>> > On 8/5/10, Richard DeVenezia <rdevenezia@gmail.com> wrote:
>> >> In a Proc SUMMARY OUTPUT statement is there a way to set the format
of
>> >> the created variables ?
>> >>
>> >> Conside a table with x,y,z formatted 2.
>> >>
>> >> The statement
>> >> OUTPUT SUM ( X Y Z ) = X_SUM Y_SUM Z_SUM
>> >>
>> >> causes X_SUM Y_ZUM and Z_SUM to inherit the 2. format and I need
>> >> something like 8. or 12. instead
>> >>
>> >> 
>> >> Richard A. DeVenezia
>>
