BookmarkSubscribeRSS Feed
4john
Calcite | Level 5
Hi,
I am trying to concatenate 10 datasets with variables with same name but with diff.attributes.I tried to concatenate using proc append using force option .But its excluding some observations.How do i concatenate these 10 datasets into one dataset with all the observations present.

Thanks,
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
A DATA step using a SET statement, possibly with a BY (presuming sorted input), however this process could also be problematic, if you attempt to combine / interleave observations using a BY but with a particular "truncated variable" condition, your prior "sorted input" may be compromised.

If you are not concerned about the possibility of truncation, you can concatenate and then sort. Or if you have concerns about truncation, consider coding SAS LENGTH or ATTRIB statements before the SET, so that you establish sufficient SAS variable length attribute so the DATA step processing can complete with desired success that meets your objectives for the final output.

Scott Barry
SBBWorks, Inc.

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
  • 1 reply
  • 614 views
  • 0 likes
  • 2 in conversation