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

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