rsubmit; /**************************************/ /* The output from GLM is returned */ /* to the client SAS listing. */ /**************************************/ proc glm data=main.employee outstat=results; model sex=income; run; /**************************************/ /* Use GLM's output data set RESULTS */ /* to create macro variables F_STAT */ /* and PROB, which contain the */ /* F-statistic PROB>F respectively. */ /**************************************/ data _null_; set results (where=(_type_= 'SS1')); call symput('f_stat',f); call symput('prob',prob); run; /**************************************/ /* Create macro variables that */ /* contain the two statistics of */ /* interest in the client session. */ /**************************************/ %sysrput f_statistic=&f_stat; %sysrput probability=&prob; endrsubmit;
rsubmit; /**************************************/ /* Indicate to the server machine that*/ /* the HOST sort utility should be */ /* used with PROC SORT. Ask SORT to */ /* subset out only those observations */ /* of interest. */ /**************************************/ options sortpgm=host; proc sort data=tsolib.inventory out=out_of_stock; where status='Out-of-Stock'; by orderdt stockid ; run; /**************************************/ /* Output results; client will */ /* receive the listing from PRINT. */ /**************************************/ title 'Inventory That Is Currently Out- of-Stock'; title2 'by Reorder Date'; proc print data=out_of_stock; by orderdt; run; endrsubmit;