Previous Page | Next Page

SAS Component Language Dictionary

SYSTEM



Issues a host system command
Category: Command

Syntax
Details
Example

Syntax

rc=SYSTEM(cval);

rc

contains the host system return code for the operation.

Type: Numeric

cval

is the host command to be executed. To enter the host command processor for your system, specify a blank string (' ').

Type: Character


Details

Using SYSTEM is equivalent to using the X command for issuing a system command. The action that takes place depends on which command you specify. The window may be temporarily overwritten due to the actions of the command. The commands that can be issued are operating-system dependent.


Example

Issue the DIR command to the host operating system:

rc=system('dir');
if (rc) then _msg_=
   'Failed to execute the DIR command.';

Previous Page | Next Page | Top of Page