Date: Wed, 25 Feb 1998 09:14:28 -0500
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: "Michael A. Raithel" <MICHAEL.RAITHEL@RAITHM49.CUSTOMS.SPRINT.COM>
Subject: (MVS): Re(2): how to send to sleep an MVS SAS Job?
Tibor PEAK posted the following interesting question:
>Does anyone has any idea how to sleep a little bit in a
>SAS program that runs in an MVS batch Job? Under OS/2 SAS
>has a Sleep() procedure, is there any similar under MVS?
>(We would like to wait for the arriving of an input file
>if it is not yet available.)
Tibor, that is an interesting question! No less
interesting was Paul Shipley's cool assembler routine to
accomplish the feat. (That posting is a KEEPER)! By now,
you know that there _IS NOT_ a sleep() function in SAS
under OS/390 (MVS). But, there _IS_ a SAS-based solution
that you can implement.
I want to draw your attention to an answer that was offered
when this question was asked in September of 1997. Paul
Dorfman posted an elegant solution (elegant because it
offered two alternatives, and because the first alternative
was done in fewer lines of code than my own solution
((sigh!))) that is a great piece of code! Here, in part,
is Paul's posting:
>If you need to cause a delay within a data step you can
>either use this code excerpt
>DROP IT; IT = TIME(); DO WHILE(TIME()-IT < 20); END;
>directly anywhere within the data step hardcoding the
>number of seconds desired (in this case 20). Alternatively
>(my preference) one could store a macro like
>DROP IT; IT = TIME();
>DO WHILE(TIME()-IT < &S); END;
Tibor, if you want to get Paul's entire posting out of the
SAS-L archives, here are the vital statistics:
>Date: Mon, 29 Sep 1997 17:18:50 -0700
>From: Paul Dorfman <PDORFMA@UCS.ATT.COM>
>Subject: MVS equiv of PC SAS sleep() function?
Tibor, best of luck in curing your OS/390 (MVS)
applications' insomnia, and Paul, thanks again for a great
piece of SAS code!
I hope that this suggestion proves helpful now, and in the
Of course, all of these opinions and insights are my own,
and do not reflect those of my organization or my
Michael A. Raithel
"The man who wrote the book on performance"
Author: Tuning SAS Applications in the MVS Environment
...to sleep, perchance to dream; aye there's the rub, for
in that sleep of death, what dreams may come when we have
shuffled off this mortal coil must give us pause...