Functions and CALL Routines under OpenVMS |
Submits an operating system command for execution.
Category: |
Special
|
OpenVMS specifics: |
Issues DCL commands; some commands
execute in a subprocess, others in the parent process
|
See: |
CALL SYSTEM Routine in
SAS Language Reference: Dictionary
|
CALL SYSTEM(DCL-command);
|
-
DCL-command
-
can be any of the following under OpenVMS:
-
a DCL command enclosed in single or
double quotation
marks
-
an expression whose value is a DCL command
-
the name of a character variable whose value is
a DCL command.
In the windowing environment, a new window
is displayed when the command executes. Any output from the command is displayed
(for example, a directory listing). Select the File
menu and click on Exit
to remove this window.
Note that some DCL commands execute in the parent OpenVMS process
and some execute in a subprocess. For more information, see Issuing DCL Commands during a SAS Session.
The CALL SYSTEM routine is similar to
the X statement, the X command, the %SYSEXEC macro,
and the VMS function; however, it can be called conditionally. In most cases,
the X statement, the X command, or the %SYSEXEC macro
are preferable because they require less overhead. However, the CALL SYSTEM
routine can be useful in certain situations because it is executable, and
because it accepts expressions as arguments. The benefit of the CALL SYSTEM
routine being callable is that it is not executed unconditionally at DATA
step compile time, whereas other methods are.
The following is an example of the CALL SYSTEM routine:
data _null_;
call system('define mylib [mydir.datasets]');
run;
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.