Chapter Contents |
Previous |
Next |
FILENAME |
Valid: | anywhere |
UNIX specifics: | device-type, external-file, and host-options |
Syntax | |
Device Information in the FILENAME Statement | |
See Also |
Syntax |
FILENAME fileref <device-type > 'external-file' <host-options>; |
FILENAME fileref device-type <'external-file'> <'host-options'>; |
FILENAME fileref CLEAR | _ALL_ CLEAR; |
FILENAME fileref LIST | _ALL_ LIST; |
FILENAME fileref ('pathname-1' ... 'pathname-n'); |
D | default format (same as variable). |
F | fixed format. That is, each record has the same length. Do not use RECFM=F for external files that contain carriage-control characters. |
N | binary format. The file consists of a stream of bytes with no record boundaries. |
P | print format. On output, the SAS System writes carriage-control characters. |
V | variable format. Each record ends in 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). If you specify RECFM=S3270VBS, then you should specify BLDSIZE=32760 and LRECL=32760 to avoid errors with records longer than 255. |
Note: To use the S370V, S370VB, or S370VBS
format to access a file that was created under the OS/390 operating
environment, the file must be of type RECFM=U.
This option is used for both input and output.
Device or Access Method | Function | External-file |
---|---|---|
CATALOG | references a SAS catalog as an external file. | is a valid two-, three-, or four-part SAS catalog name followed catalog options (if needed). See SAS Language Reference: Dictionary for details. |
DISK | associates the fileref with a DISK file. | is either the pathname for a single file or, if you are concatenating filenames, a list of pathnames separated by blanks or commas and enclosed in parentheses. The level of specification depends on your location in the file system. Character Substitutions in Pathnames shows character substitutions you can use when specifying a UNIX pathname. |
DUMMY | associates a fileref with a null device. | none. DUMMY allows you to debug your application without reading or writing to a device. Output to this device is discarded. |
sends electronic mail to an address. | is an address and e-mail options. See Sending Electronic Mail from Within the SAS System (EMAIL) for more information. | |
FTP | reads or writes to a file from any machine on a network that is running an FTP server. | is the pathname of the external file on the remote machine followed by FTP options. See SAS Language Reference: Dictionary and Assigning Filerefs to Files on Other Systems (FTP and SOCKET access types) for details. If you are transferring a file from the OS/390 operating environment and you want to access that file using any of the S370 formats, then the file must be of type RECFM=U before you transfer it to UNIX. |
PIPE | reads input from or writes output to a UNIX command. | is a UNIX command. See Routing Output for details. |
PLOTTER | sends output to a plotter. | is a device name and plotter options. See Using PRTFILE and PRINT with a Filerefand Using the PRINTTO Procedure for details. |
PRINTER | sends output to a printer. | is a device name and printer options. See Using PRTFILE and PRINT with a Filerefand Using the PRINTTO Procedure for details. |
SOCKET | reads and writes information over a TCP/IP socket. | depends on whether the SAS application is a server application or a client application. In a client application, external-file is the name or IP address of the host and the TCP/IP port number to connect to followed by any TCP/IP options. In a server application, it is the port number to create for listening, followed by the SERVER keyword, and then any TCP/IP options. See SAS Language Reference: Dictionary for details. |
TAPE | associates a fileref with a tape. | is the pathname for a tape device. The name specified should be the name of the special file associated with the tape device. See Processing Files on TAPE for more information. |
TEMP | associates a fileref with an external file stored in the WORK data library. | none. |
TERMINAL | associates a fileref with a terminal. | is the pathname of a terminal. |
URL | allows you to access remote files using the URL of the file. | is the name of the file that you want to read from or
write to on a URL server. The URL must be in one of these forms:
http://hostname/file http://hostname:portno/file |
XPRINTER | sends output to the default printer that was set up through the Printer Setup dialog box. | none. |
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.