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

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

Register now

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
  • 990 views
  • 1 like
  • 2 in conversation