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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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