CODE:
Data New;
merge WORK.COMBINED _EXP2_.TRADES_22FEB2010;
by symbol time;
Run;
ISSUE: want to merge two data sets so that there are unique entries for each time by symbol, such that at each "TIME" there is a row in each data set with 120 unique "SYMBOL".
ERROR: BY variables are not properly sorted on data set WORK.COMBINED.
time=57599970 symbol=MELI best_hft_bid=40.78 best_nonhft_bid=40.91 best_hft_ask=41.04
best_nonhft_ask=40.93 hft_bsize=1200 hft_asize=3100 nonhft_bsize=100 nonhft_asize=2839 date=22FEB2010
shares=50 buysell=B price=36.8300 type=NN FIRST.symbol=0 LAST.symbol=0 _ERROR_=1 _N_=505346
NOTE: MERGE statement has more than one data set with repeats of BY values.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 29127 observations read from the data set WORK.COMBINED.
NOTE: There were 480364 observations read from the data set _EXP2_.TRADES_22FEB2010.
WARNING: The data set WORK.NEW may be incomplete. When this step was stopped there were 505345
observations and 15 variables.
WARNING: Data set WORK.NEW was not replaced because this step was stopped.
Before merge both data sets should be sorted by symbol time. Sort WORK.COMBINED before merging.
proc sort data=WORK.COMBINED;
by symbol time;
run;
Sort each dataset before merge as the error indicates.
Or switch to a proc sql.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: