*
; options nosource; %macro identity(data,result,x,y); /*calculates line of identiy and adds the 2 points to a SAS dataset */ /*written: 13. June, 1994, Arnold Schick Universitity of Marburg */ options nosymbolgen nonotes nostimer nosource; %if &data = or &data = . %then %let data = _LAST_; %if &result = or &result = . %then %let result = _NEW_; %if &x = or &x = . %then %let x = x; %if &y = or &y = . %then %let y = y; proc means data=&data noprint min max; var &x &y; output out=_MINMAX_ min=x_min y_min max=x_max y_max; run; data _NULL_; set _MINMAX_; call symput('x_min',x_min); call symput('x_max',x_max); call symput('y_min',y_min); call symput('y_max',y_max); run; options notes; data &result; set &data end=last; keep &x &y; if last then do; output; &x = .; &y = .; output; &x = &x_min - 0.1/(&x_max-&x_min); &y = &x; output; &x = &x_max + 0.1/(&x_max-&x_min); &y = &x; output; end; else output; run; options source symbolgen stimer; %mend identity; options source; /* *Example: ; data one; do x=1 to 11; y=ranuni(0); output; end; run; %identity(one,two,x,y); proc gplot; symbol i=join ; plot y*x / skipmiss; run; quit; */ *;