Previous Page | Next Page

SAS Commands under Windows

INCLUDE Command: Windows

Copies the entire content of an external file into the current window.
Windows specifics: valid options

See Also


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


specifies a valid Windows external file specification, such as a fileref, a file shortcut, a Windows filename that is enclosed in quotation marks, an environment variable, or an unquoted filename that resides in the current directory.


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.


specifies one or more portable options, which are documented under the INCLUDE command in SAS Help and Documentation.


specifies the number of bytes that are physically read or written in an I/O operation. The default is 8K. The maximum is 1M.


is used in the context of I/O operations on variable record format files. When this option is specified, any occurrence of ^Z is interpreted as character data and not as an end-of-file marker.


specifies the record length (in bytes). Under Windows, the default is 256. The value of record-length can range from 1 to 1,073,741,823 (1 gigabyte).


is used only in the context of Dynamic Data Exchange. This option enables you to use nontab character delimiters between variables. For more information on this option, see Using the NOTAB Option with DDE.


controls the record format. Under Windows, the following values are valid:


indicates fixed format.


indicates binary format and causes the file to be treated as a byte stream. If LRECL is not specified, by default SAS reads 256 bytes at a time from the file.


indicates print format.


indicates the variable S370 record format (V).


indicates the variable block S370 record format (VB).


indicates the variable block with spanned records S370 record format (VBS).


indicates variable format. This value is the default.


The INCLUDE command copies the entire contents of an external file into the active window.

If you do not specify a file-specification, then SAS uses the filename from the previous FILE or INCLUDE command. If you have not issued any FILE or INCLUDE commands, you receive an error message indicating no default file exists.

In the Enhanced Editor, if the filename is eight characters or less, the file extension of .SAS is appended to file-specification. No extension is appended for a file-specification longer than eight characters.

See Also

Previous Page | Next Page | Top of Page