Ok. I have tried your code: data _null_; infile "C:\Users\eggl2000\Desktop\weights.csv" obs=20; input; list; run; Note: 20 records were read from the infile: "C:\Users\eggl2000\Desktop\weights.csv" The minimum record length was 27. The maximum record length was 74. proc print; run; (It seems to work. The code ''proc print'' gave me this output. It is my external final csv entirely. ) You must note that I want to choose the top 5 industries ( with the next codes) but many lenders lend to two or three industries maximum. In this case, the code must choose all industries when we count less than five. LenderID year ind1 ind2 ind3 ind4 ind5 ind6 ind7 ind8 ind9 ind10 … 36 2006 0 0 0 0 0 0 1 0 0 0 … 36 2008 0,5 0 0 0 0 0 0 0,5 0 0 … 36 2009 0 0 0 0 0 0 0 0 0 1 … 36 2011 0,5 0 0 0 0 0 0 0 0 0,5 … 36 2012 0 0 0,33333333 0 0 0 0,66666667 0 0 0 … 309 1997 0,25 0 0 0,25 0 0 0 0 0 0,5 … 309 1998 0 0 0 0 0 0 0 0 0 1 … … … … … … … … … … … … … … How the other codes are adapted to this change? We didn't have ''w'' anymore. Thank you.
... View more