Chapter Contents

Previous

Next
SAS/CONNECT User's Guide

Example 4. Compute Services: Asynchronous Remote Processing


Purpose

Enables you to submit processing to be performed on a remote host so that the local host can immediately continue processing, and then retrieve and merge the results upon completion of that process.


Program

This example submits a PROC SORT and a PROC PRINT statement to be executed asynchronously on a remote host. This remote process can be tested for completion by using the macro variable DONE.

rsubmit cwait=no cmacvar=done;
   proc sort data=permdata.standard(keep=fname
      lname major tgpa gender)
      out=honor_graduates(where=(tgpa>3.5));
      by gender;
   run;

   title 'Male and Female Honor Graduates';
   proc print;
      by gender;
   run;
endrsubmit;

%macro get_results_when_complete;
   %if &done=0 %then %do;
     %put Remote submit complete,
        issuing "rget" to get the results.;
     rget;
   %end;
   %else %do;
     %put Remote submit not complete.;
     %put Issue:
        "%nrstr(%%)get_results_when_complete" 
        later.;
   %end;
%mend;
%get_results_when_complete;  

   /* issue again if RSUBMIT not complete */

%get_results_when_complete;


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.