I have a text file in which there are data entries like this:
apple orange fish meet kite stone
I want to create a SAS dataset like this:
VAR1 <-- this is variable name.
To read a record which contains multiple values and create multiple observations with 1 variable, you can use the INPUT statement with the double trailing @. I created a sample record with your data and then used the DATA step with INFILE and INPUT statement to read in the data to create multiple observations with 1 variable. Here is the code:
input v1 $ @@;
Here are the results from PROC PRINT: