Chapter Contents




Includes and executes SAS statements and data lines

Valid: anywhere
Windows specifics: source, if a file-specification is used; valid options for host-options

See Also


%INCLUDE source </host-options>;

Note:   This is a simplified version of the %INCLUDE statement syntax. For the complete syntax and its explanation, see the %INCLUDE statement in SAS Language Reference: Dictionary.  [cautionend]

describes the location of the information you want to access with the %INCLUDE statement. The two possible sources are a file specification or internal lines. Under Windows, you cannot use an asterisk (*) to specify keyboard entry. The file specification can be any of the file specification forms discussed in Referencing External Files.

consists of statement options valid under Windows. Remember to precede the options list with a forward slash (/). Currently, the following options are available under Windows:

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 only in the context of named pipes. This option indicates whether the client is to wait if no data are currently available.

is used only in the context of named pipes. This option indicates the type of pipe; BYTE is the default value.

is used only the context of named pipes and is valid only when defining the server. This option indicates that if an end-of-file (EOF) character is received from a client, the server should try to connect to the next client.

specifies the record length (in bytes). Under Windows, the default is 256. The value of record-length can range from 1 to 1,048,576 (1 megabyte).

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

controls the record format. The following values are valid under Windows:
F indicates fixed format.
N indicates binary format and causes the file to be treated as a byte stream.
P indicates print format.
V|D indicates variable format. This is the default.
S370V indicates the variable S370 record format (V).
S370VB indicates the variable block S370 record format (VB).
S370VBS indicates the variable block with spanned records S370 record format (VBS).

The S370 values are valid with OS/390-style files only--that is, files that are binary, have variable-length records, and are in EBCDIC format. If you want to use a fixed-format OS/390 (formerly known as MVS) file, first copy it to a variable-length, binary OS/390 file.


When you execute a program that contains the %INCLUDE statement, SAS executes your code, including any statements or data lines that you bring into the program with %INCLUDE.

See Also

Chapter Contents



Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.