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 (November 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 28 Nov 2008 00:14:03 -0500
Reply-To:     Joe Whitehurst <joewhitehurst@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Joe Whitehurst <joewhitehurst@GMAIL.COM>
Subject:      Re: deleting datasets with SAS call system(command)
Comments: To: Yu Zhang <zhangyu05@gmail.com>
In-Reply-To:  <129a50e0811272057l3e8377ep5c54a5bc0da4668c@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Red Eagle,

Oops, the DELETE function is one of the SAS Component Language functions that is NOT available using %sysfunc. Use the SAS Component Language function FDELETE instead.

Joe

On 11/27/08, Joe Whitehurst <joewhitehurst@gmail.com> wrote: > Red Eagle, > > If you use the SAS Component Language Delete function (available with > just SAS/Base using the %sysfunc function). no operating system > command windows appear, you get a return code indicating success or > failure, and the function works on all supported operating systems: > > sysrc=DELETE(name<,type,<,password<,generation>>>); > > sysrc > contains the return code for the operation: > > 0 > successful > > 0 > not successful > > Type: Numeric > > name > is the name of the member of the SAS data library or the physical > pathname of an external file or directory. If a one-level name is > specified for a SAS data library member, the library is assumed to be > USER. > > Type: Character > > type > specifies the type of element to delete: > > 'ACCESS' > an access descriptor that was created using SAS/ACCESS software. > > 'CATALOG' > a SAS catalog or catalog entry. If a one- or two-level name is > specified, the catalog is deleted. If a four-level name is specified, > the entry is deleted. > > 'DATA' > a SAS table. (This is the default.) > > 'FILE' > an external file or directory. > > 'MDDB' > an MDDB. > > 'VIEW' > a SAS table view. > > Type: Character > > password > is the password that is assigned to the SAS table when type is DATA. > > Type: Character > > generation > is the generation number of the SAS table that is being deleted. > > Type: Numeric > > Details > DELETE attempts to delete the specified member and returns a value > indicating whether the operation was successful. You can use DELETE to > delete files or empty directories that are external to a SAS session, > as well as members of a SAS data library. > > > Joe > > > On 11/27/08, Yu Zhang <zhangyu05@gmail.com> wrote: > > look up the system option: > > > > noxwait and noxsync > > > > > > Yu > > > > > > On Thu, Nov 27, 2008 at 9:59 PM, Red Eagle <rdb1956@hotmail.com> wrote: > > > > > I have a piece of SAS code which deletes a file based on some condition. > > > The only problem is when the file is deleted the DOS editor window opens. > > > I don't want the DOS editor window opening when the SAS code process > > > deletes > > > files. > > > > > > Delete_this_file = 'c:\dletemenow'; > > > If condition = true then call system(delete_this_file); > > > > > > Result, deletes file and opens dos window. > > > SAS 9.1.3 running on Windows XP latest patches. > > > > > > Thanks in advance for any suggestions. > > > > > >


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