Previous Page | Next Page

Statements under UNIX

%INCLUDE Statement: UNIX

Brings a SAS programming statement, data lines, or both into a current SAS program.
Valid: anywhere
UNIX specifics: source, if a file specification is used; valid values for encoding-value
See: %INCLUDE Statement in SAS Language Reference: Dictionary

See Also


%INCLUDE source-1 <...source-n> </<SOURCE2> <S2=length><ENCODING='encoding-value'><host-options>>;


describes the location you want to access with the %INCLUDE statement. The three possible sources are a file specification, internal lines, or keyboard entry. The file specification can be any of the file specification forms that are discussed in Accessing an External File or Device in UNIX Environments.

Note:   When using aggregate syntax, if the member name contains a leading digit, enclose the member name in quotation marks. If the member name contains a macro variable reference, use double quotation marks.  [cautionend]


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

When you read data from the specified source, 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.


consists of statement options that are valid under UNIX. The following options are available:


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


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


specifies the record format. The following values are valid under UNIX:


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.


variable S370 record format (V).


variable block S370 record format (VB).


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

The S370 values are valid with files laid out as z/OS files only. That is, files are binary, have variable-length records, and are in EBCDIC format. If you want to use a fixed-format z/OS file, first copy it to a variable-length, binary z/OS file.


If you specify any options in the %INCLUDE statement, remember to precede the options list with a forward slash (/).

See Also

Previous Page | Next Page | Top of Page