/* pgm 10.2 */ /* */ /* set with 'by' aka 'interleaving' */ /* */ data a ; * first dataset with w x y ; input w x y ; * two observations ; cards ; 2 1 4 3 3 0 ; run ; data b ; * second dataset with x y z ; input x y z ; * three observations ; cards ; 2 1 0 4 0 3 6 2 2 ; run ; /* put them together */ /* expect 5 obs and 4 vars */ data aandb ; set a b ; by x ; * both a and b already in order by x ; run ; /* print them out */ proc print data=aandb ; title2 'by x' ; run ;