DSNAME Function

Returns the SAS data set name that is associated with a data set identifier.

Category: SAS File I/O

Syntax

DSNAME(data-set-id)

Required Argument

data-set-id

is a numeric variable that specifies the data set identifier that is returned by the OPEN function.

Details

DSNAME returns the data set name that is associated with a data set identifier, or a blank if the data set identifier is not valid.

Example

This example determines the name of the SAS data set that is associated with the variable DSID and displays the name in the SAS log.
%let dsid=%sysfunc(open(sasuser.houses,i));
%put The current open data set
is %sysfunc(dsname(&dsid)).;

See Also

Functions: