Chapter Contents |
Previous |
Next |
VMS |
Language element: | function |
Category: | general-purpose OpenVMS |
OpenVMS specifics: | All aspects are host-specific |
Syntax | |
Details | |
Comparisons | |
See Also |
Syntax |
VMS(DCL-command) |
Details |
The VMS function
spawns a subprocess and executes the command that is passed to it. Any output
that is produced is sent to SYS$OUTPUT. If
you are using the SAS windowing environment, the results appear in a new window.
To close the new window, select the File menu and
then select
Exit
. This
is consistent with the behavior of the X statement and the X command.
If the VMS function executes successfully, the return value is 0. Otherwise, the return value is an OpenVMS error code that indicates why the function failed. If you supply an invalid command, you will receive a return error code such as the following:
229520 |
%CLI-W-IVVERB, unrecognized command verb - check validity and spelling. |
Comparisons |
The VMS function is similar to the X statement, the X command, the %SYSEXEC macro, and the CALL SYSTEM routine. In most cases, the X statement, the X command, or the %SYSEXEC macro are preferable because they require less overhead. However, the VMS function is useful for conditional processing because it returns a return code. The CALL SYSTEM routine can be useful in certain situations because it is executable, and because it accepts expressions as arguments.
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.