![]() Chapter Contents |
![]() Previous |
![]() Next |
| FILENAME, URL Access Method |
| Valid: | anywhere |
| Category: | Data Access |
| Syntax | |
| Arguments | |
| Details | |
| Examples | |
| Example 1: Accessing a File at a Web Site | |
| Example 2: Specifying a User Id and a Password | |
| Example 3: Reading the First 15 Records from a URL File | |
| See Also | |
Syntax |
|
FILENAME fileref URL 'external-file'
<url-options>; |
| http://hostname/file | |
| http://hostname:portno/file |
Operating Environment Information:
For
details
on specifying the physical names of external files, see the SAS documentation
for your operating environment. ![[cautend]](../common/images/cautend.gif)
| Default: | 8K |
| Tip: | The result of the HELP command is returned as records. |
| Default: | 256 |
| Tip: | You can specify the PROMPT option instead of the PASS option, which tells the system to prompt you for the password. |
| Tip: | If you specify PROMPT, you do not need to specify PASS=. |
| http://hostname/ | |
| http://hostname:portno/ |
| Default: | V |
| Tip: |
If you specify user='*', then the user is prompted for an id. |
| Interaction: | If PROMPT is specified, but USER= is not, the user is prompted for an id as well as a password. |
| Details |
Operating Environment Information:
| Examples |
This example accesses document test.dat at site
www.a.com:
filename foo url 'http://www.a.com/test.dat'
proxy='http://www.gt.sas.com';
This example accesses document file1.html at site
www.b.com and requires
a user id and password:
filename foo url 'http://www.b.com/file1.html'
user='jones' prompt;
filename foo url
'http://www.sas.com/service/techsup/intro.html';
data _null_;
infile foo length=len;
input record $varying200. len;
put record $varying200. len;
if _n_=15 the stop;
run;
| See Also |
Statements:
|
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.