/* pgm 10.2 */ /* */ /* simple example of set */ /* with pdv 'IN' variables */ /* */ 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(in=isita) b(in=isitb) ; /* IN= variables only in PDV */ put x= y= isita= isitb= ; * put _all_ ; itsa = 'no ' ; * space so no length statement ; if( isita ) then itsa = 'yes' ; if( isitb ) then itsb = 'yes' ; run ; /* print them out */ /* will we see isita, isitb?*/ proc print data=aandb ; title 'set a b' ; run ;