![]() Note that, to accomplish the match-merge, we have to place the DESCENDING keyword in the BY statement before the subj variable, so that SAS knows that the input data sets ( descdemog and descstatus) are sorted in descending order. The DATA step tells SAS that we want to match-merge the data sets appearing in the MERGE statement ( descdemog and descstatus), by the variable appearing in the BY statement ( subj), and to store the result in a new data set called descpatients. The match-merge again takes place in the third DATA step, in which we see a MERGE statement and a BY statement. The keyword DESCENDING that precedes the subj variable in each SORT procedure tells SAS to sort the subj values in descending order - that is, with the largest subj value appearing first, and the smallest subj value appearing last. The two SORT procedures tell SAS to sort the demog and status data sets by the variable subj, and to store the results, respectively, in data sets called descdemog and descstatus.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |