* Union Example Form the union of two datasets using (1) stacking and (2) interleaving; options ls=64 nodate pageno=1; data coarse; infile 'c:/datasets/bolts-coarse.txt' firstobs=2; input cat_no $ size diam length price; data fine; infile 'c:/datasets/bolts-fine.txt' firstobs=2; input cat_no $ size diam length price; proc print data=coarse; proc print data=fine; data stack; set coarse (in=coarse) fine (in=fine); if coarse then type='coarse'; if fine then type='fine'; proc print data=stack; data interleave; set coarse (in=coarse) fine (in=fine); by cat_no; if coarse then type='coarse'; if fine then type='fine'; proc print data=interleave; run; quit;