DM 'CLEAR LOG'; DM 'CLEAR OUTPUT'; OPTIONS LINESIZE=72 NODATE NONUMBER; DATA file1; INFILE 'a:\concat1.txt'; INPUT w x y $ z; PROC SORT DATA=file1; BY y; DATA file2; INFILE 'a:\concat2.txt'; INPUT w x y $ z; PROC SORT DATA=file2; BY y; DATA file3; SET file1 file2; BY y; PROC PRINT DATA=file3; TITLE 'Result of SET with a BY statement'; DATA file4; SET file1 file2; PROC PRINT DATA=file4; TITLE 'Result of SET without a BY statement'; RUN;