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 (August 2005, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 4 Aug 2005 12:47:56 -0700
Reply-To:     tanwan <tanwanzang@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         tanwan <tanwanzang@YAHOO.COM>
Organization: http://groups.google.com
Subject:      Re: cpu time
Comments: To: sas-l@uga.edu
In-Reply-To:  <1123179725.099647.183550@o13g2000cwo.googlegroups.com>
Content-Type: text/plain; charset="iso-8859-1"

The PRINTTO procedure can send the log to a file you specify. The NEW word ensures that this file is replaced. In its absence the output is appended to the file if it already exists.

You may then scan that file and read the time used (in seconds). In this example it is stored in data TimeUsed, and is available for further use in the same SAS session or another session.

Submitting PROC PRINTTO; RUN; will re-direct the log and output to the default destinations.

options stimer ls=256 ps=256; proc printto new LOG = 'c:\temp\saslog.txt';run;

/*** INCLUDE THE PROCEDURE(S) WHOSE DURATION YOU NEED HERE ***/

proc printto;run;

data TimeUsed; infile 'c:\temp\saslog.txt'; input @'PROCEDURE' procedure $; input @'real time' realtime; input @'cpu time' cputime; ;

proc print data=TimeUsed; run;


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