Hi, I'm new to SAS and I'm wondering how could I download a set of datasets in zips from a website, and then importing them to SAS.
The website is https://s3.amazonaws.com/tripdata/index.html, and can be access like:
https://s3.amazonaws.com/tripdata/ + id of every file (example, 201306-citibike-tripdata.zip) and always repeats the name
Here, i have the code I'm using, but it only gets 1 zip, decompress, and import into a table. I want it to do it with every file.
Thank you!!
Here are useful links for you:
Also, just in case:
You most definitely can do this, but you may need a loop or macro.
Here's an example of how to get the list of files and to access them:
Basically, get it working for one file then convert that to a macro. Use methods above to get all files listed and then call the macro once for each file.
@mjcm0030 wrote:
Hi, I'm new to SAS and I'm wondering how could I download a set of datasets in zips from a website, and then importing them to SAS.
The website is https://s3.amazonaws.com/tripdata/index.html, and can be access like:
https://s3.amazonaws.com/tripdata/ + id of every file (example, 201306-citibike-tripdata.zip) and always repeats the name
Here, i have the code I'm using, but it only gets 1 zip, decompress, and import into a table. I want it to do it with every file.
Thank you!!
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.