- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello Experts,
Do you know please how to import the file from web. I'm using the code like :
data scores;
infile "http://XXXX/Liste.txt" truncover;
format name $8.;
informat name $8.;
input name ;
run;
But it doesn't work.
Thank you very much for your help !
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you !
My problem is that this file doesn't existe until clicking on http://XXXXXX. In web, there is the request (the client's request -> server) and the response (server -> client's browser). The response from http://XXXXXX is a file stream type txt (generated with php).
I'm wondering if there is possible to import this kind of file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Doesn't work is awful vague.
Are there errors in the log?: Post the code and log in a code box opened with the "</>" to maintain formatting of error messages.
No output? Post any log in a code box.
Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the "</>" icon or attached as text to show exactly what you have and that we can test code against.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I have an error that there is no file. My problem is that this file doesn't existe until clicking on http://XXXXXX. In web, there is the request (the client's request -> server) and the response (server -> client's browser). The response from http://XXXXXX is a file stream type txt (generated with php).
I'm wondering if there is possible to import this kind of file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Perhaps Proc HTTP can help.
You can provide instructions like "GET" to request data but I don't use this and there are likely to be a number of additional pieces of information that you may need to provide to get the correct connection.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You need to use the URL filename engine. Otherwise is just going to look for a file on the local computer with that name.
infile "http://XXXX/Liste.txt" url truncover;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@SASdevAnneMarie wrote:
Thank you Tom ! The file is generated by php only if I request it with http://XXXXXX, so it's "instantly generated txt file". I don't know If I can use the proc http with that.
It is not 1992 anymore. Most of the url's on the web are not pointing at actual files. So try it and see.