Previous Page | Next Page

Commands under UNIX


Copies the entire contents of an external file into the current window.
UNIX specifics: valid values for encoding-value and portable-options



INCLUDE <file-specification> <ENCODING='encoding-value'> <portable-options> <host-options>


can be any of the following:

  • a single filename. SAS searches for the file in the current directory. If you enclose the filename in quotation marks, then SAS uses the filename exactly as you specify it. If you do not enclose the filename in quotation marks and if you do not specify a filename extension, then SAS searches for

  • an entire pathname. SAS does not assume any filename extensions, even if you do not enclose the pathname in quotation marks.

  • a fileref.


specifies the encoding to use when reading from the external file. The value for ENCODING= indicates that the external file has a different encoding from the current session encoding.

When you read data from an external file, SAS transcodes the data from the specified encoding to the session encoding.

For valid encoding values, see Encoding Values in SAS Language Elements in SAS National Language Support (NLS): Reference Guide.


are options for the INCLUDE command that are valid in all operating environments. See the SAS Language Reference: Dictionary for information about these options.


are specific to UNIX environments. These options can be any of the following:


specifies the number of bytes that are physically read in one I/O operation. The default is 8K. The maximum is 1G-1.


specifies the logical record length. Its meaning depends on the record format in effect (RECFM). The default is 256. The maximum length is 1G.

  • If RECFM=F, then the value for the LRECL= option determines the number of bytes to be read as one record.

  • If RECFM=N, then the value for the LRECL= option must be at least 256.

  • If RECFM=V, then the value for the LRECL= option determines the maximum record length. Records that are longer than the specified length are truncated.


specifies the record format. Values for the RECFM= option are


default format (same as variable).


fixed format. That is, each record has the same length.


binary format. The file consists of a stream of bytes with no record boundaries.


print format.


variable format. Each record ends with a newline character.


If you do not enter a file specification, then SAS uses the filename from the previous FILE or INCLUDE command. In this case, SAS first asks if you want to overwrite the file. If you have not issued any FILE or INCLUDE commands, then you receive an error message to indicate that no default file exists.

Previous Page | Next Page | Top of Page