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 (December 2001, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 7 Dec 2001 07:59:56 -0600
Reply-To:     greg.woolridge@TAP.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Greg  Woolridge <greg.woolridge@TAP.COM>
Subject:      Re: How does SAS work?
Comments: To: "Stanley A. Gorodenski" <vvgsgor@DE.STATE.AZ.US>
Content-type: text/plain; charset=us-ascii

What SAS does is to write the output to a temporary file during the PROC or DATA step. Once the step is complete, the file is then copied to the data set named for the output. Therefore; if you are reading and writing to the same data set, SAS first creates the temporary data set, copies the temporary data set over the original one and then deletes the temporary data set. This is why you must have at least 2x the needed disk space for any data set SAS creates.

Greg M. Woolridge Manager, Study Programming TAP Pharmaceutical Products Inc. e-mail: greg.woolridge@tap.com phone: 847-582-2332 fax: 847-582-2403

"Stanley A. Gorodenski" To: SAS-L@LISTSERV.UGA.EDU <vvgsgor@DE.ST cc: ATE.AZ.US> Subject: How does SAS work? Sent by: "SAS(r) Discussion" <SAS-L@LISTSER V.UGA.EDU>

12/07/01 07:38 AM Please respond to "Stanley A. Gorodenski"

Within one procedure, such as proc summary or proc sort, I can read from and write to the same file, such as in:

proc summary data=cy1998.temp; by assn ernumber; var wage981 wage982 wage983 wage984; output out=cy1998.temp max(wage981 wage982 wage983 wage984)=;

This is IBM mainframe and in my JCL I have the following allocation for the file: //CY1998 DD DSN=USRG.TEST.OF.IT.STAN,UNIT=3390, // DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(10,10),RLSE),DCB=(BUFNO=2,BLKSIZE=4096)

How does SAS do this, i.e., read from and write to the same file in one procedure? If this were SPSS, the job would abort, with the message: 'File is already in use and not closed'.

Thanks. Stan


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