DATA Step, Macro, Functions and more

Downloading S3 files from AWS

Reply
Frequent Contributor
Posts: 122

Downloading S3 files from AWS

Hi,

 

I am trying to dowload or directly read S3 files from AWS in a SAS BASE program. Is that possible?

 

I have found in documentation the procedure 'proc S3', but it's not avalilable in my SAS version.

 

Is there any other way to read or download S3 files to SAS??

 

I am working with SAS EG 6.1

 

Thanks in advance

Super User
Posts: 19,822

Re: Downloading S3 files from AWS

Posted in reply to juanvg1972

What's your SAS version, not EG version?

 

%put &sysvlong;
Super User
Posts: 5,431

Re: Downloading S3 files from AWS

6.1 would be 9.4, but perhaps an earlier maintenance level.

Upgrading within a major SAS release is usually not a very big task (depending on the nature of the installation of course).

Data never sleeps
Frequent Contributor
Posts: 122

Re: Downloading S3 files from AWS

SAS admins don't plan any upgrading coming soon...

 

If you can give  a possible solution to download S3 files not with 'proc S3' I will be very gratefuk

 

Sorry for my english and thanks!!

Frequent Contributor
Posts: 122

Re: Downloading S3 files from AWS

I am sorry, my SAS EG is 7.11

and SAS: 9.04.01M4P110916

Super User
Posts: 5,431

Re: Downloading S3 files from AWS

Posted in reply to juanvg1972
PROC S3 should be available in the M4 release...?
Data never sleeps
Frequent Contributor
Posts: 122

Re: Downloading S3 files from AWS

I have read that is: 9.04M5, but I am not sure.....

 

I can't upgrade, becasuse admins don't plan do it....until.....I don't know....

 

Is there any other solution to connect SAS to AWS S3 and download files?

 

Thanks in advance

Frequent Contributor
Posts: 119

Re: Downloading S3 files from AWS

Posted in reply to juanvg1972

I think your version of SAS even predates PROC HTTP which would allow you to go against S3 REST APIs.

 

Consider doing it outside of SAS and bringing it in a delimited file or something else.

Super User
Posts: 19,822

Re: Downloading S3 files from AWS

Posted in reply to juanvg1972

If the version is correct it should have PROC S3 Included as part of the Base Procedure which is most SAS installations. 

What makes you think you don't have PROC S3? 

 

If you're getting an error message post your code and log. 

Frequent Contributor
Posts: 122

Re: Downloading S3 files from AWS

This is my log:

 

27         proc s3 ;
ERROR: Procedure S3 not found.
28            create "/xxxxxxxx";
29         run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE S3 used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
Super User
Posts: 19,822

Re: Downloading S3 files from AWS

Posted in reply to juanvg1972

What's your output from a PROC SETINIT?

Are you sure your version is correct? Perhaps they didn't install it correctly?

 

I would consider contacting SAS tech support and talking to your IT area. If they've explicitly locked down access to S3 that's something you would need to be aware of before proceeding in my opinion.

Frequent Contributor
Posts: 119

Re: Downloading S3 files from AWS

Reeza,

 

He mentioned that he is using SAS 9.04. I don't think it existed at that time.

Super User
Posts: 19,822

Re: Downloading S3 files from AWS

@AlanC The SAS version posted is 9.4 TS1M4 which does support PROC S3. 

 

Frequent Contributor
Posts: 119

Re: Downloading S3 files from AWS

Correct. I didn't see that SAS posts the version that way. Thanks.

Ask a Question
Discussion stats
  • 13 replies
  • 196 views
  • 3 likes
  • 4 in conversation