Special SPDO Statements

PROC SPDO SPDSCMD Statement

The SPDO commands described in this section require that ACLSPECIAL= is enabled for your SPDO LIBNAME connection.
To enable ACLSPECIAL=, you must first grant the SPD Server user ID ACLSPECIAL= access rights. Next, the user must request access for a specific connection. To request access, the user adds the ACLSPECIAL=YES option to the LIBNAME statement. The user can now submit SPDO commands:
SPDSCMD 'command'
The PROC SPDO SPDSCMD statement sends SPD Server a command to run. SPD Server uses the host system() call to run the command. The command is executed according to the user ID rights of the individual or administrator that started the SPD Server session. SPD Server returns the system() call value to PROC SPDO. PROC SPDO echoes the exit status of the command that was run on the host.
No restrictions are placed on commands that are executed in this manner. Therefore, you must carefully consider which SPD Server users need ACLSPECIAL access rights.
Note: For additional information about using PROC SPDO, see Controlling SPD Server Resources with PROC SPDO.

SPDSCMD= Statement Examples

List the WORKPATH directory:
spdscmd 'ls /spdswork/*.spds';
spdscmd 'dir d:\spdswork\*.spds';
Clean up WORKPATH files:
spdscmd 'rm /spdswork/*.spds';
spdscmd 'del d:\spdswork\*.spds';

Validating PROC SPDO SPDSCMD Statement Execution

PROC SPDO SPDSCMD Statement

When you use the PROC SPDO SPDSCMD statement to perform a system command, PROC SPDO sets the SAS SYSRC macro variable to the value that was returned by the system command.
Note: System commands executed on Linux do not reliably return the status of the command being executed. Therefore, PROC SPDO cannot set the SYSRC macro variable.
If the SPD Server cannot run the system command for any reason, PROC SPDO sets the SAS SYSERR macro to 1012.