How to Create a new data set from multiple data sets based upon sorted order

Create a new data set from multiple data sets based upon sorted order

Use the SET and BY statements to interleave data sets.

Note: Interleaving uses a SET statement and a BY statement to create a new, sorted data set from multiple data sets. The number of observations in the new data set is the sum of the number of observations in the original data sets. The observations in the new data set are arranged by the values of the BY variable(s) and, within each BY-Group, the order of the data sets in which they occur, including duplicates.

To interleave, data sets need to be in sorted order or indexed on the BY variables.



Output:
source: support.sas.com

Comments

  1. I like to give my sincere thanks to make a blog for sas discussion,but i like to stick to the old format that you made in the sas9.blogspot.com.if you make the same format here that will be a good one...

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete

Post a Comment

Popular posts from this blog

SAS Interview Questions and Answers: CDISC, SDTM and ADAM etc

Comparing Two Methods for Removing Formats and Informats in SAS: DATA Step vs. PROC DATASETS

Studyday calculation ( --DY Variable in SDTM)