SAS Safety Scalable Performance Data Server 4.5 Manual Do Utilizador

Página de 271
unusable state. In this case, you can submit the PROC DATASETS REPAIR command
to restore the tables to a usable state.
The OPER DISCONNECT command differs from the OPER CANCEL command.
When the OPER DISCONNECT command is submitted, the user proxy continues until
it detects that the control socket connection has been dropped. As a result, the OPER
DISCONNECT command has the potential to complete. However, when the control
socket disconnect is detected by the user proxy varies, with different results.
OPER INTERRUPT;
The OPER INTERRUPT command sets a soft interrupt flag in any open tables that
belong to the user proxy. During certain long-running operations, such as large table
sorts, table scans with a WHERE clause, or index creations, the user proxy periodically
checks for an interrupt flag in all of the open tables that are involved in the operation.
If an interrupt flag is detected, the user proxy terminates the operation and any
previously opened tables are closed.
Unlike the OPER CANCEL command or the OPER DISCONNECT command, the
OPER INTERRUPT command initiates a soft exit of the user proxy. The user receives
a message in the SAS log that states that the job has been interrupted. If the job did not
finish, then the results might be incomplete. However, the user LIBNAME will be
intact, and the user proxy will still be viable. Whether a job will be interrupted cannot
be determined; it depends on the job that is currently running. To determine if a job can
be interrupted, submit a SHOWLIBNAME libref / DATA=_ALL_ command before
you submit the OPER INTERRUPT command to see all of the open tables. You can
also submit the SHOWLIBNAME libref/ DATA=_ALL_ command after you submit
the OPER INTERRUPT command, to see if all of the open tables were closed. If the
tables are still open after the OPER INTERRUPT command has been submitted, you
can wait and check again later. If the tables need to be closed immediately, you can use
the OPER CANCEL command to cancel the user proxy.
TRUNCATE Command and Example
The TRUNCATE command is a PROC SPDO command that allows you to delete all of
the rows in a table without deleting the table structure or metadata.
%let host=kaboom;
%let port=5191;
%let domain=path2;
LIBNAME &domain sasspds "&domain"
 server=&host&port
 user='anonymous'
 ip=YES;
/* create a table */
DATA &domain..staceys_table;
 do i = 1 to 100;
 output;
 end;
 run;
214
Chapter 16 • SPD Server Operator Interface Procedure (PROC SPDO)