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 (October 2002, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 30 Oct 2002 13:27:13 -0800
Reply-To:     "Huang, Ya" <ya.huang@PFIZER.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Huang, Ya" <ya.huang@PFIZER.COM>
Subject:      Re: Sleep Function for NON WINDOWS OS
Comments: To: "Cassell.David@EPAMAIL.EPA.GOV" <Cassell.David@EPAMAIL.EPA.GOV>
Content-Type: text/plain

Thanks David,

Ian in a private response also pointed the same thing. Now what I am not sure is that, obviously when a real sleep() is running, you can't execute the subsequent statement, therefore it makes no difference from my fake sleep(), because anyway you have to wait, no matter SAS take too much CPU time or not. On the other hand, if a real sleep() function really does not take much cpu time, OS might be smart enough to allocate the CPU time to other application. I'm not sure if VMS will grab the spare time from SAS and give to other application, my understanding to old VMS system is that how much time slot one application can get, depends on the priority of the job, which is pretty much defined before you run the job, therefore, a job can't really get the other's job's cpu time even it is in 'idle'. I don't believe that's the case any more for open VMS.

I wonder if someone can do a test to see how big a difference there is. It seems to me for Windows, I can run my fake sleep and in the meantime run IE browser and outlook email without noticing significant slow down.




-----Original Message----- From: David L. Cassell [mailto:Cassell.David@EPAMAIL.EPA.GOV] Sent: Wednesday, October 30, 2002 1:05 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Sleep Function for NON WINDOWS OS

"Huang, Ya" <ya.huang@PFIZER.COM> replied [in part]: > Here is a simple macro, you may use it as a sleep function: > > 73 %macro sleep(sec=); > 74 data _null_; > 75 t1=time(); > 76 do until(t2-t1 >= &sec); > 77 t2=time(); > 78 end; > 79 run; > 80 %mend;

While this will make the OS wait for SEC seconds, it isn't really a sleep() function. It makes the OS burn cpu cycles, rather than just waiting a set amount of time to re-start.

If Charles really needs an OS-independent option, then I would suggest using the X command and Perl, which *does* run on Open MVS with the same sleep() function that it has on every other platform.

David -- David Cassell, CSC Senior computing specialist mathematical statistician

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