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 (November 2003, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 11 Nov 2003 11:24:35 +0100
Reply-To:     Jan Selchau-Hansen <jan@*SELCHAU-HANSEN.DK>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jan Selchau-Hansen <jan@*SELCHAU-HANSEN.DK>
Organization: TDC Totalloesninger
Subject:      Re: Formatting the output from a numeric macrovariable

"Rune Runnestoe" <rune@fastlane.no> skrev i en meddelelse news:24410121.0311110204.13434e7d@posting.google.com... > %let num_1=33; > %let num_2=295; > %let pst_kont = %sysevalf(100/&num_1*&num_2); > %put &pst_kont; > > &pst_kont evaluates to 893.939393939393, and I want it to evaluate to > 894. Without any digits behind the decimal point. > How do I format a macro variable like pst_kont ? > > Regards > Rune Runnestoe

Use round & sysfunc, like this : %let num_1=33; %let num_2=295; %let pst_kont = %sysfunc(round(%sysevalf(100/&num_1*&num_2))); %put &pst_kont;


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