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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 797 views
  • 1 like
  • 3 in conversation