LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2003, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 25 Sep 2003 09:05:14 -0400
Reply-To:     Jim Villacorte <ungas@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jim Villacorte <ungas@YAHOO.COM>
Subject:      Re: Proc Tabulate Formats Question

The function vformat will return a variables format.

e.g. f= vformat(myVariable);

>hi, > >I have a variable myVariable that is formatted somewhere else in the >program. > >I have a macro that i pass in the name of a variable (i.e myVariable) >and that macro will have a proc tabulate that produces the sum of >myVariable in the cell of the table. > >the number (sum) of the variable (myVariable) will not be formatted the >same way the variable is (myVariable is comma8. for example) > >so you have to do *f=comma8. or such. > >is there a way to detect the formatting of the variable that is being >passed in, and to format the sum of it the same way it is? > >I know I can do that indirectly (and undesirably) by outputting a >dataset from porc content and them getting the format of the variable >(myvariab;e) and then assigning that to a macro, then using that >format...etc, But i was trying to find a better solution. > >is there some function to extract the format of a variable? or is there >a way to tell proc tabulate that the sum of a variable should have the >same format as the variable it self? > >thanks


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