Specifies the current output file for PUT statements.
Valid in: | a DATA step |
Restriction: | When SAS is in a locked-down state, the FILENAME statement is not available for files that are not in the lockdown path list. For more information, see SAS Processing Restrictions for Servers in a Locked-Down State in SAS Language Reference: Concepts. |
Windows specifics: | Valid values for file specification; valid values for encoding-value; valid options for host-option-list |
See: | FILE Statement in SAS Statements: Reference |
can be any of the file specification forms discussed in “Referencing External Files” in the “Using External Files” section in SAS Companion for Windows.
specifies permissions to set for the specified fileref.
A::<trustee_type>::<permissions>
Access permissions. No other values are supported.
u | user |
g | group (all groups) |
o | other (all others, including the user who generates the file.) |
The permission values take the values r (Read), w (Write), and x (Execute), in that order. If you do not want to grant one of these permissions, enter a - in its place (for example, r-x or rw-).
permission='A::o::r--'
specifies the encoding to use when writing to the output file. The value for ENCODING= indicates that the output file has a different encoding from the current session encoding.
can be any of the options for the FILE statement that are valid in all operating environments.
names external I/O statement options that are specific to the Windows operating environment. They can be any of the following:
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 is currently available. BLOCK is the default value.
is used only in the context of named pipes. This option indicates the type of pipe. BYTE is the default value.
is used only in the context of Dynamic Data Exchange (DDE). This option enables you to issue a remote command for applications that do not use the SYSTEM topic name. For more information, see “Referencing the DDE External File” and “Controlling Another Application Using DDE” in the “Using Dynamic Data Exchange” section in SAS Companion for Windows.
is used only in 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.
is used only in the context of Dynamic Data Exchange (DDE). For a complete description and an example of using this option, see “Using the DDE HOTLINK” in the “Using Dynamic Data Exchange” section in SAS Companion for Windows.
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 32767. The value of record-length can range from 1 to 1,073,741,823 (1 gigabyte).
specifies that output should be appended to an existing file.
is used only in the context of Dynamic Data Exchange (DDE). This option enables you to use non-tab character delimiters between variables. For more information about this option, see “Using the NOTAB Option with DDE” in the “Using Dynamic Data Exchange” section in SAS Companion for Windows.
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. If LRECL is not specified, by default SAS uses the default value of 32767 bytes at a time from the file. |
P | indicates print format. |
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). |
V | D | indicates variable format. This format is the default. |
is used only in the context of named pipes. This option specifies how long a named pipe client should wait for a busy pipe. The minimum (and default) value for seconds is 10.
is used only in the context of named pipes. This option specifies the mode of a named pipe. The default value is SERVER.
specifies the end-of-line character for the file. Use this option to share files between the UNIX and Windows operating environments. Here are the valid values:
Carriage return line feed. Use TERMSTR=CRLF to write files that are formatted for Windows. CRLF is the default.
Line feed. Use TERMSTR=LF to write files that are formatted for UNIX.
New line. Use TERMSTR=NL to write files that are formatted for UNIX.