BookmarkSubscribeRSS Feed
UIC_Student
Calcite | Level 5

I have a simple code such as below 

 


libname hwtest '/folders/myfolders/HPA477';

data h477;
set hwtest.whq_e;
run;
data h4772;
set hwtest.demo_e;
run;

proc sort data =h477;
by seqn;
run;
proc sort data=h4772;
by seqn;
run;

data merged;
merge h477 h4772;
by seqn;
run;

proc print data=merged;
run;


that is taking a very long time to run and I have to cancel each time. This is SAS University Edition .

2 REPLIES 2
pearsoninst
Pyrite | Level 9
For Long dataset it is good not to print just see the dataset as dataset or Export the dataset and explore..
Reeza
Super User
Which apart is taking a long time to run. Also, you don't need the first two steps - combine those into your proc sort to help speed things up:

proc sort data=hwtest.whq_e out=h477;
by seqn;
run;

And as @pearsoninst mentioned, remove the proc print.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1166 views
  • 1 like
  • 3 in conversation