Previous Page | Next Page

Initializing and Configuring SAS Software

Specifying Physical Files

Overview of Physical Files

Wherever you specify the name of a physical file internally (for example, in a SAS LIBNAME or FILENAME statement, in a LIBNAME or FILENAME function, in a DATA step, or in a SAS procedure), the name can be in any of these forms:

Note that names of physical files should be enclosed in quotation marks.

Specifying Physical Files with the INCLUDE Command

Here are examples of the INCLUDE command that illustrate the various ways you can specify physical files:


MYPGM is a fileref that was previously associated with an external file.


PGM1 is a member of the partitioned data set that is associated with the fileref MYPGM.


This is an example of a sequential data set name.


This is an example of a sequential data set name that uses the designator for the MVS file system.


This is an example of a data set name with a member specified.


Assuming that the FILESYSTEM= system option is set to MVS, SAS adds a prefix to this data set name that contains the value of the SAS system option SYSPREF=, which defaults to your system prefix. If FILESYSTEM=HFS, SAS looks into your default UNIX System Services directory for the "hidden" file .TEST.MYPGM.

INCLUDE 'HFS:/u/userid/mypgms/mypgm1.c'

This is an example of a path to a UNIX File System (UFS) file in the Hierarchical File System (HFS), represented by a fully qualified path. For more information about HFS and UFS, see HFS, UFS, and zFS Terminology.

INCLUDE 'pgms/mypgms/mypgm1.c'

This is an example of a relative path to a UNIX File System file. Any filename containing a slash (/) is assumed to be in UNIX File System, regardless of the value of the FILESYSTEM= system option. If the pathname does not begin with a slash (/), then SAS searches for the file in the default UFS directory for that user.

Handling of Nonstandard Member Names

You can use the SAS system option FILEEXT= to specify how extensions in member names of partitioned data sets are to be handled. See FILEEXT= System Option: z/OS for more information.

Previous Page | Next Page | Top of Page