Functions and CALL Routines under z/OS |
Category: | External Files |
z/OS specifics: | fileref |
See: | FDELETE Function in SAS Language Reference: Dictionary |
Syntax | |
Details | |
Examples |
Syntax |
FDELETE (fileref) |
identifies an external file. If fileref is a literal fileref name, it must be in quotation marks. If fileref is the name of a character variable whose value is a fileref name, it must not be quoted. The fileref must have been previously associated with a sequential file, a PDS, a PDSE, or a UNIX System Services file using a FILENAME statement or FILENAME function. The fileref cannot represent a concatenation of multiple files.
Details |
FDELETE returns 0 if the operation was successful, or a nonzero number if it was not successful. If the fileref that is specified with FDELETE is associated with a UNIX System Services directory, PDS, or PDSE, then that directory, PDS, or PDSE must be empty. In order to delete the directory or file, the user that calls FDELETE must also have the appropriate privileges.
Examples |
filename delfile 'myfile.test'; data _null_; rc=fdelete('delfile'); run;
Example of a variable whose value is a fileref name:
data _null_; delref = 'delfile'; rc = fdelete(delref); run;
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.