Prev: Terminology Change?
Next: Ranking by State
From: mark on 2 Mar 2010 16:18 Hello I need to obtain a single sas file which has all the periods Period 1 and Period2 ( period 2A + Period2B ). Period 1 Period 2A Period 2B Variable COLUMNS COLUMNS COLUMNS Transaction ID 1 8 1 8 1 8 Date of Sale 9 18 9 18 Time of Sale 19 26 9 16 Laptop Model 27 32 19 24 Units Sold 33 35 25 27 Warranty 36 28 I've used the code - libname sc 'c:\Sas'; data period1; infile 'c:\Sas\period1_sales_data.dat.'; Input TransactionID $1-8 DateofSale $9-18 TimeofSale $19-26 LaptopModel $27-32 UnitsSold 33-35 Warranty 36 ; proc print data = period1; TITLE 'period1 sales'; run; data period2A; infile 'c:\Sas\period2_sales_data_A.dat.'; Input TransactionID $1-8 DateofSale $9-18 LapstopModel $19-24 UnitsSold 25-27 Warranty 28 ; proc print data=period2A; TITLE 'period2A sales'; run; data period2B; infile 'c:\Sas\period2_sales_data_B.dat'; Input TransactionID $1-8 TimeofSale $9-16; Proc sort data = period2_sales_data_B; By TransactionID; proc print data=period2B; TITLE 'period2B sales'; RUN; Using the above code craetes two columns of the Laptop model , when one column ends at some point the data remaining is printed on the second column. I think that i need to change the oredr of the input variables in data setp. Kindly guide, markc
From: Waynette Tubbs on 2 Mar 2010 16:47 Markc, A great place to post your question is on support.sas.com. Many SAS users and professionals offer tips and help in the SAS Discussion Forums. http://bit.ly/11Nwcb. best of luck! Waynette Tubbs (http://twitter.com/WaynetteTubbs) --- frmsrcurl: http://compgroups.net/comp.soft-sys.sas/SAS-Datastep
|
Pages: 1 Prev: Terminology Change? Next: Ranking by State |