%INCLUDE Statement: UNIX
Brings a SAS programming statement, data lines,
or both into a current SAS program.
Valid in: |
anywhere |
UNIX specifics: |
source,
if a file specification is used; valid values for encoding-value |
See: |
%INCLUDE Statement in SAS Statements: Reference |
Syntax
%INCLUDE source-1 <...source-n> </<SOURCE2> <S2=length>
<ENCODING='encoding-value'> <host-options> > ;
Required Argument
- source
-
describes the location
that 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.
Optional Arguments
- ENCODING='encoding-value'
-
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.
- host-options
-
consists of statement
options that are valid under UNIX. The following options are available:
- BLKSIZE=block-size
- BLK=block-size
-
specifies the number
of bytes that are physically read or written in an I/O operation.
The default is 8K. The maximum is 1M.
- LRECL=record-length
-
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).
- RECFM=record-format
-
specifies the record
format. The following values are valid under UNIX:
D |
default format (same as variable). |
F |
fixed format. That is, each record has the same
length.
|
N |
binary format. The file consists of a stream of
bytes with no record boundaries.
|
P |
print format. |
V |
variable format. Each record ends with a newline
character.
|
S370V |
variable S370 record format (V). |
S370VB |
variable block S370 record format (VB). |
S370VBS |
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.
Details
If you specify any options
in the %INCLUDE statement, remember to precede the options list with
a forward slash (/).