LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (October 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 27 Oct 2008 22:18:35 +1100
Reply-To:     Scott Bass <sas_l_739.at.yahoo.dot.com.dot.au@PESTO.CC.UGA.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Scott Bass <sas_l_739.at.yahoo.dot.com.dot.au@PESTO.CC.UGA.EDU>
Subject:      Re: Record start and end time for entire program in log
Comments: To: sas-l@uga.edu

I'm doing this from memory...if it doesn't work exactly as typed, well, you can always read the doc ;-)

%let start=%sysfunc(datetime()); data _null_; set my_sas_program; run; %let end=%sysfunc(datetime()); %let elapsed=%sysevalf(&end-&start); %put &elapsed;

"sas 9 bi user" <sas9bi@GMAIL.COM> wrote in message news:af7d406c0810261512s6021b160v9f01ea99989a6586@mail.gmail.com... > All - > > I have a long program that takes some time to run. > > How do I create a macro variable that prints in the log the time the > program > started, ended, and outputs how long the process took in hours, mins, > seconds? > > Say the below took 5 hours to run, please let me know how I could add some > macro vars to calculate the total running time of all 3 processes below. > > /* 1st step*/ > data b; > set a; > s = 1; > run; > > /* 2nd step*/ > proc sort data=b; > by id; > run; > > /* 3rd step*/ > proc print data=b; > run; > > So I would like to know how long it took for step 1, 2 and 3 to run. > How do I put macro variables to output that after step 3 is done and have > it > show in the log? > > Thanks!!!


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