Thanks a lot ! data_null_ and cwilson. it really work well.
Here's another suggestion if you have differing numbers of commas in column A.
Create an array of your desired variables, then
Create an array of character variables t1 - tM where M = number of input variables (n) + maximum number of commas.
The length of each temporary variable must exceed the length of any input variable.
Input the data into the variables t1 - tM as text.
if t{n+1} is not blank then
t1 = catx (', ', t{1}, t{2}) ;
t{2} = t{3} ; etc to t{M-1} = t{M} ;
repeat until t{n+1} is blank
copy values to the array of desired values
Drop all the t{*} values
Use do while () or do until () to loop until t{n+1} is blank
Use do k = 1 to n to copy values from the t{*} array to the wanted values
Do any text to numeric conversion en route as required
Richard
Maybe your csv file is not real CSV file. Use double quote around it .
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.