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-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!

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.

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