![]() Chapter Contents |
![]() Previous |
![]() Next |
| SAS/CONNECT User's Guide |
| Purpose |
| Program |
Here are two examples: the first example uses an application that is available only on the remote host; the second example uses an application that performs a sorting task more efficiently than the applications that are available on the local host.
| Example 1.1: SAS/STAT Software |
This example assumes that SAS/STAT is licensed only on the remote host. The program runs statistical procedures remotely by using SAS/STAT.
rsubmit;
/**************************************/
/* The output from GLM is returned */
/* to the local 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 local session. */
/**************************************/
%sysrput f_statistic=&f_stat;
%sysrput probability=&prob;
endrsubmit;
| Example 1.2: Sorting |
In this example, the remote host has access to a fast sorting utility, so that the data is sorted on the remote host before it is transferred to the local host.
rsubmit;
/**************************************/
/* Indicate to the remote host 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; local side 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;
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.