Previous Page | Next Page

Functions and CALL Routines under OpenVMS

RENAME Function: OpenVMS



Renames a file.
Category: External Files
Category: SAS File I/O
OpenVMS specifics: When only old-name and new-name are specified, SAS renames a file, not a SAS data set.
See: RENAME Function in SAS Language Reference: Dictionary

Syntax
Details
See Also

Syntax

RENAME(old-name,new-name)

old-name

is the current name of the file. It can be a character variable, a character literal enclosed in double quotation marks, or another character expression.

new-name

is the new name of the file. It can be a character variable, character literal enclosed in double quotation marks, or another character expression.


Details

You must have proper access to both the directory that contains the file and the file that you want to rename. If the RENAME function executes successfully, the return value is 0. Otherwise, the return value is the OpenVMS error code that indicates why it failed.

The following are two common error codes:

98962

File not found.

98970

Insufficient privilege or file protection violation.

The text of the error codes is retrieved using the GETMSG function.

See Also

Previous Page | Next Page | Top of Page