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

Hello I am using the following command to get the listing of the S3 bucket. it goes into the log file.

How to put it into a SAS dataset?

 

%let s3bucketpath=s3://***-pr-brz-datareten-edp-nprod;

filename oscmd pipe "aws s3 ls ""&s3bucketpath."" ";
1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

You need to pair this PIPE output with a DATA step, something like:

 

data WANT; 
  infile oscmd pad; 
  input LINE 256.;
  /* parse the line into fields */
  FNAME=substr(X,..); 
run;
Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!

View solution in original post

3 REPLIES 3
ChrisHemedinger
Community Manager

You need to pair this PIPE output with a DATA step, something like:

 

data WANT; 
  infile oscmd pad; 
  input LINE 256.;
  /* parse the line into fields */
  FNAME=substr(X,..); 
run;
Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
alepage
Barite | Level 11

I am not familliar with pad

 

What does it stand for ?

Tom
Super User Tom
Super User

@alepage wrote:

I am not familliar with pad

 

What does it stand for ?


It means what it sounds like.  The lines are padded with spaces to the full logical record length.

Not much use for it since they introduced the TRUNCOVER option some 30 to 40 years ago.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 219 views
  • 1 like
  • 3 in conversation