Previous Page | Next Page

SAS Component Language Dictionary

SASTASK



Determines whether a SAS procedure is running
Category: Interface to SAS Software

Syntax
Example

Syntax

rc=SASTASK();

rc

contains the return code for the operation:

1

A SAS procedure is active.

0

No SAS procedure is active.

Type: Numeric


Example

Determine whether a SAS procedure is currently running before attempting to submit code to SAS software. If so, display a message to inform the user why the code cannot be submitted.

if (sastask()) then
 _msg_='Another procedure is currently active.';
else
   do;
      submit continue;
         data a;
            x=1;
         run;
      endsubmit;
   end;

Previous Page | Next Page | Top of Page