Date: Thu, 4 Sep 2008 08:57:23 -0700
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Subject: Re: Unable to clear libname - Libname <name> clear (z/OS)
Content-Type: text/plain; charset="ISO-8859-1"
makes the sleep call platform-independent. On Windows, the default unit
is seconds, and on other platforms, the default unit is milliseconds.
So x = sleep(10) on z/OS, the platform used by the original poster,
would cause a pause of 1/100th of a second, not 10 seconds.
On Thu, 4 Sep 2008 09:13:39 -0500, "Carl Denney"
> Try adding this to make SAS pause for 10 seconds.
> data _null_;x=sleep(10);run;
> At 08:57 AM 9/4/2008, Marc Weinmann wrote:
> Hi all - I am using SAS 9.1 on Z/OS, having trouble clearing a
> using 'libname <name> CLEAR;' I open four libraries at the
> start of the
> program, and clear all four at the end, at least I try to --
> where my problem is. One libname that won't clear is produced
> by a PROC
> SORT data=xxxx out=yyyyy that in a code sense is the immediate
> SAS statement to my block of LIBNAME <name> clear statements.
> It would
> seem perhaps the PROC SORT is still runnning when SAS
> encounters the
> LIBNAME name clear statements.
> A simplified example follows, and the actual error. The
> original code
> is a macro program. Each time I invoke the macro I want it to
> open four
> libraries at the top of the macro, and close four libraries at
> the end
> of its code.
> Any ideas how to wait for the dataset to cease being used, or
> to check
> what is using it?
> PRINT(myprog): LIBNAME SA2FILE "UO.NHRF0810.OFF12SA2"
> UNIT=EUSER LABEL=RETPD=365
> RROR: Unable to clear or re-assign the library SA2FILE because
> it is
> still in use
> RROR: Error in the LIBNAME statement.
> Program: (&OFFNUM is a macro variable)
> LIBNAME SA2FILE "UO.NHRF0810.OFF&OFFNUM.SA2"
> UNIT=EUSER LABEL=RETPD=9 ;
> <.. Various processing statements ..>
> PROC SORT DATA=TEMP2.POLS OUT=SA2FILE.POLS; BY REC_NUM;
> LIBNAME SA2FILE CLEAR;
> Carl Denney, MSIE
> Health InfoTechnics
> 210 Jamestown Park, Suite 101, Brentwood, TN 37027
> 1. http://www.healthinfotechnics.com/
email@example.com <== Use this, not firstname.lastname@example.org