12-08-2015 06:59 AM
Hi, I have a data file in which all data is concatenated. I want to split the data in to columns. How can i do that?
Any help is greatly appreciated.
Here is the example
I want create seperate variables for below. Right now it is all in one column.
systemkey eventkey CDMDescription UB92 revenuecategory Qty TotalChg Count
systemkey eventkey CDMDescription UB92 revenuecategory Qty TotalChg Count 103 5527 Cytarabine Inj 0636 Medication 36 106.00 12 103 5931 Cytarabine Inj 0636 Medication 151 48.75 12 103 6097 Cytarabine Inj 0636 Medication 378 1185.90 3
12-08-2015 07:49 AM
Precisely the advice given above, what consists of the divder between the data. Once you know that then look up in the documentation the function scan(), e.g. for /
data want; set have; var1=scan(your_data,1,"/"); var2=input(scan(your_date,2,"/"); /* For numeric */ etc. run;