Usage Note 6814: Example of SYSTASK COMMAND statement to start a SAS batch job within a
SAS program
The SYSTASK COMMAND statement allows you to execute a host command from
within SAS. The syntax for running a SAS batch job from the SYSTASK
COMMAND statement is as follows:
systask command '"C:\Program Files\SAS Institute\SAS\V8\sas.exe"
-sysin "c:\anydir\dataone.sas"' taskname="sasbat" status=batstat;
or
systask command "c:\progra~1\sasins~1\sas\v8\sas.exe
-sysin c:\atestdir\dataone.sas" taskname="sasbat" status=batstat;
Replace the directory paths above with the location of your SAS files.
Note: The TASKNAME option identifies a name for the task and options
STATUS specifies a macro variable in which you want SYSTASK to store the
status of the task. See the SAS OnlineDoc for complete documentation.
Note: Refer to TS-648 for batch mode instructions at
http://support.sas.com/techsup/technote/ts648/ts648.pdf
Operating System and Release Information
| Product Family | Product | System | Reported Release | Fixed Release* |
| SAS System | Base SAS | Microsoft Windows NT Workstation | 8 TS M0 | |
| Microsoft Windows 95/98 | 8 TS M0 | |
| Windows Millennium Edition (Me) | 8.2 TS2M0 | |
| Microsoft Windows 2000 Server | 8 TS M0 | |
| Microsoft Windows 2000 Advanced Server | 8 TS M0 | |
| Microsoft Windows 2000 Datacenter Server | 8 TS M0 | |
| Microsoft Windows 2000 Professional | 8 TS M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Date Modified: | 2005-04-14 17:48:15 |
| Date Created: | 2002-01-30 10:06:52 |