BookmarkSubscribeRSS Feed
Aaron19
Calcite | Level 5

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.

2 REPLIES 2
stat_sas
Ammonite | Level 13

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;

Reeza
Super User

Sort each dataset before merge as the error indicates.

Or switch to a proc sql.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 701 views
  • 0 likes
  • 3 in conversation