BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sathya66
Barite | Level 11

All,

I have "=" and ":" signs in the S3 bucket , when I try to read it I am getting below error. Please can you suggest.

 

ERROR: Relative pathnames are not allowed.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE S3 used (Total process time):
real time 0.05 seconds
cpu time 0.02 seconds

proc s3 
 
    awsconfig="&config."
     awscredentials="&creds."      ;
     list "&bucket./date=2021-09-19/time=09:20/" ;
run; 

 

1 ACCEPTED SOLUTION

Accepted Solutions
sathya66
Barite | Level 11
SAS TECH said ,It is working in 94M7 . We are on a different version.
Either We need to upgrade to M7 or need to request for a hotfix.

View solution in original post

6 REPLIES 6
Kurt_Bremser
Super User

What is contained in macro variable &bucket?

Run

%put "&bucket.";

and post the log from that.

Given that you have a UNIX behind AWS, I would strongly recommend to not use characters like the equal sign and the colon in file/directory names.

sathya66
Barite | Level 11
&bucket is bucket path of ours.
like list "/data/common/date=2021-09-19/time=09:20/" ;

I know ,That is very weird, as “=” is used for hive partitioning and is standard for partitioning files in s3.
I already told the team to change the folder structure but it is a time taken process so I want to try with this above path.
Kurt_Bremser
Super User

The ERROR complains about a relative path, usually pointing to a missing forward slash at the start of the path; since you seem to have that, it might be that the equal sign or the colon causes S3 to expect another slash.

sathya66
Barite | Level 11

any idea about URLcodes for sas. I need for "=" and ":".

https://documentation.sas.com/doc/en/vdmmlcdc/1.0/lefunctionsref/p19ckwqexa3ir8n19hbvcz73lhmj.htm

 

If I use URLCODE like this , there is no ERROR but not listing the content in that bucket.

proc s3 
 
    awsconfig="&config."
     awscredentials="&creds."      ;
     list "&bucket./date%3D2021-09-19/time%3D09%3A20/" ;
run; 
Tom
Super User Tom
Super User

If you want to know the hexcodes for those characters use the $HEX format.

You might also try using \ character to "escape" the equal sign and colon.

 

Might be best to open a ticket with SAS support to ask them how PROC S3 is supposed to represent names like that.

sathya66
Barite | Level 11
SAS TECH said ,It is working in 94M7 . We are on a different version.
Either We need to upgrade to M7 or need to request for a hotfix.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1063 views
  • 0 likes
  • 3 in conversation