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.