CALL SYSTEM Routine

Submits an operating environment command for execution.

Category: Special
Interaction: When invoked by the %SYSCALL macro statement, CALL SYSTEM removes quotation marks from its arguments. For more information, see Using CALL Routines and the %SYSCALL Macro Statement.
See: CALL SYSTEM Routine: Windows in SAS Companion for Windows
CALL SYSTEM Routine: UNIX in SAS Companion for UNIX Environments
CALL SYSTEM Routine: z/OS in SAS Companion for z/OS

Syntax

CALL SYSTEM(command);

Required Argument

command

specifies any of the following: a system command that is enclosed in quotation marks (character string), an expression whose value is a system command, or the name of a character variable whose value is a system command that is executed.

Operating Environment Information: See the SAS documentation for your operating environment for information about what you can specify.
Restriction The length of the command cannot be greater than 1024 characters, including trailing blanks.

Details

The behavior of the CALL SYSTEM routine is similar to that of the X command, the X statement, and the SYSTEM function. It is useful in certain situations because it can be conditionally executed, it accepts an expression as an argument, and it is executed at run time.

See Also

Functions: