I have data in .txt file ,where each word is separated by single space like below.
mayoflstat mayolc accrual mayolc
Now I would like to read the .txt file and create a single variable having the below values.
Text
mayoflstat
mayolc
accrual
mayolc
data test;
INFILE '/home/rpv/var.txt' dlm =" " ;
INPUT Text $1000.;
RUN;
I there any options need to add the above code to get the required result? or need to update the code.
Thank you in advance.
It's worked. Thank you
Try this
data test;
infile "<your path here>" truncover;
input var $30. @;
run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
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.
Ready to level-up your skills? Choose your own adventure.