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

I am importing one .lst file by following code

 

data import;
 infile  "S3_Location/File.lst" length=len;
 length text $500;
 input text $varying. len;
run; 

input is

 

parameter passed = S3_Location/File.csv
2019-09-02 06:18:37    3092373 File.csv
successful

 

output is 

text
parameter passed = S3_Location/File.csv
2019-09-02 06:18:37    3092373 File.csv
successful

 

I wanted this output to converted like this

 

LocationDate_timesizefiletransfer
parameter passed =S_location/File.csv02/09/2019 06:183092373File.csvsuccessful
1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

Not see your real data, but try this.

 

data import;
 infile  "S3_Location/File.lst" truncover dlm=' ';
 input #1 location $100. 
#2 date : $12. time : $10. size file : $40.
#3 transfer $40. ;
run;

 

View solution in original post

3 REPLIES 3
Ksharp
Super User

Not see your real data, but try this.

 

data import;
 infile  "S3_Location/File.lst" truncover dlm=' ';
 input #1 location $100. 
#2 date : $12. time : $10. size file : $40.
#3 transfer $40. ;
run;

 

Srigyan
Quartz | Level 8

from where you learned all that, do you want to suggest any reference.:)

Ksharp
Super User

Check  Documentation for SAS/Base at support.sas.com

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 3 replies
  • 888 views
  • 1 like
  • 2 in conversation