View of W_debug.SAS



/* W_debug.sas  - use this program to practice debugging */
%global XYZ;

 options nosource nonotes;  
           /* ---------------------------------  */
           /* send the log window to the browser */
           /* ---------------------------------  */

%macro noexit(myname);
data _null_;
m = symget("&myname");
n = translate(trim(m),'____________________','%&"()'';,');
call symput("&myname",n);
run;
%mend noexit;


%noexit(XYZ);


%out2htm(capture=on, window=log );

data _null_;
  
 
 sg="&XYZ";  

 put "Field XYZ contained: " / sg ; 

run;


%out2htm(htmlfref=_webout,
             capture=off,
             window=log,
             runmode=s,
             openmode=replace);

           /* ---------------------------- */
           /* make a test dataset          */
           /* ---------------------------- */

data test;
do x=1 to 10;
 y=x*2;
 z=x*3;
 output;
end;

run;

           /* ------------------------------------- */
           /* send the output window to the browser */
           /* ------------------------------------- */

%out2htm(capture=on, window=output );

proc print data=test;
 
run;
%out2htm(htmlfref=_webout,
             capture=off,
             window=output,
             runmode=s,
             openmode=append);


   

back to the overview