The OPERATE Procedure |
Displaying Information about a Server |
You use the DISPLAY SERVER command to display summary information about the current server. Here is the syntax for this command:
DISPLAY SERVER; |
DISPLAY SERVER server-ID <(SAPW=password)>; |
DISPLAY SERVER server-ID </ SAPW=password>; |
displays summary information about a specific server For more information, see Specifying a Server.
must be a valid SAS name that is 1 to 8 characters in length. The value for this option is replaced by Xs in the log. To protect this password, you should use the security software at your site to limit access to the SAS program statements that create the server.
is an encoded version of a password. Using encoded passwords promotes security and enables you to store SAS programs that do not contain clear-text passwords.
To obtain an encoded password, specify the clear-text password as input to the PROC PWENCODE statement.
Here is an example of code for obtaining an encoded password:
proc PWENCODE in="srvmach"; run; {sas001}c2Vydm1hY2g=The clear-text password srvmach is specified in the PROC PWENCODE statement. The output is generated in the form {key}encoded-password . sas001 is the key, which is used to decode the encoded password to its clear-text form when the password is needed.
Note: The encoded password is case-sensitive. Use the entire generated output string, including the key.
Use the output from the PROC PWENCODE statement as the value for encoded-password in the appropriate statement.In the following example, the DISPLAY SERVER command displays information about the server SHARE1.
proc operate; display server share1;
Alternatively, you can use the SERVERID= option in the PROC OPERATE statement to identify the default server. The default server is also the current server unless you use the SET SERVER command and specify a different current server. In the following example, the statements display information about the default server SHARE1, which is also the current server.
proc operate serverid=share1; display server;
Aliases: | DISP SERVER, D SERVER |
Quiescing a Server |
You use the QUIESCE SERVER command to move a server from an active status to a stopped status by gradually releasing libraries and users, and denying new requests to access libraries through the server. Here is the syntax for this command:
QUIESCE SERVER; |
QUIESCE SERVER server-ID <(SAPW=password)>; |
QUIESCE SERVER server-ID </ SAPW=password>; |
specifies the server to be terminated. If you do not specify a server ID, this command gradually terminates the current server. For information about specifying a server ID, see Specifying a Server.
must be a valid SAS name that is 1 to 8 characters in length. The value for this option is replaced by Xs in the log. To protect this password, you should use the security software at your site to limit access to the SAS program statements that create the server.
is an encoded version of a password. Using encoded passwords promotes security and enables you to store SAS programs that do not contain clear-text passwords.
To obtain an encoded password, specify the clear-text password as input to the PROC PWENCODE statement.
Here is an example of code for obtaining an encoded password:
proc PWENCODE in="srvmach"; run; {sas001}c2Vydm1hY2g=The clear-text password srvmach is specified in the PROC PWENCODE statement. The output is generated in the form {key}encoded-password . sas001 is the key, which is used to decode the encoded password to its clear-text form when the password is needed.
Note: The encoded password is case-sensitive. Use the entire generated output string, including the key.
Use the output from the PROC PWENCODE statement as the value for encoded-password in the appropriate statement.A quiesced server accepts only PROC OPERATE commands. Current DATA and PROC steps can continue to access files that are already open but cannot open new files or members. After a user closes all members in a server library, the server releases the library. If this is the only server library that the user has accessed, that user is disconnected from it.
The QUIESCE SERVER command does not affect server administrators. When a QUIESCE SERVER command is issued, server administrators who are executing PROC OPERATE remain connected, and the server continues to accept connections. Because the server terminates only after all users are disconnected, a server administrator can keep the server quiesced indefinitely by remaining connected to it. While a server is quiesced, an administrator can issue the START SERVER command to change the status of the server back to active.
Aliases: | QUI SERVER, Q SERVER |
Setting the Current Server |
You use the SET SERVER command to specify the current server and override the server that was specified in a previous SET SERVER command. This specified server also overrides the default server that was specified in a SERVERID= option in the PROC OPERATE statement. The effect of a SET SERVER command is limited to the current execution of PROC OPERATE. Here is the syntax for this command:
SET SERVER; |
SET SERVER server-ID <(SAPW=password)>; |
SET SERVER server-ID </ SAPW=password>; |
specifies the current server. For information, see Specifying a Server.
must be a valid SAS name that is 1 to 8 characters in length. The value for this option is replaced by Xs in the log. To protect this password, you should use the security software at your site to limit access to the SAS program statements that create the server.
is an encoded version of a password. Using encoded passwords promotes security and enables you to store SAS programs that do not contain clear-text passwords.
To obtain an encoded password, specify the clear-text password as input to the PROC PWENCODE statement.
Here is an example of code for obtaining an encoded password:
proc PWENCODE in="srvmach"; run; {sas001}c2Vydm1hY2g=The clear-text password srvmach is specified in the PROC PWENCODE statement. The output is generated in the form {key}encoded-password . sas001 is the key, which is used to decode the encoded password to its clear-text form when the password is needed.
Note: The encoded password is case-sensitive. Use the entire generated output string, including the key.
Use the output from the PROC PWENCODE statement as the value for encoded-password in the appropriate statement.If no server is specified, the SET SERVER command resets the current server to the default server that is specified in the SERVERID= option in the PROC OPERATE statement. However, if the SERVERID= option was not specified in the PROC OPERATE statement, SET SERVER retains the current server value.
In the following example, the SET SERVER command establishes the current server and displays information about that server without your having to specify a server ID.
proc operate; set server share1; display server;
In the following example, PROC OPERATE displays information about the server libraries that are identified by LIB1 and LIB2 in the DISPLAY LIBRARY command. These libraries are defined to the current server MYSHR. Next, the current server is reset to SHARE, and information is displayed about the library LIBALPHA, which is defined to the server SHARE.
proc operate serverid=share; set server myshr; display library lib1 lib2; set server; display library libalpha;
If you do not identify a server before you issue a command that acts on the current server, PROC OPERATE issues the following message:
ERROR: PROC OPERATE is not currently set to any server, so this command will be ignored. Use the 'SET SERVER serverid;' command to establish communication with a server.
Restarting a Quiesced Server |
You use the START SERVER command to restart a server from a quiesced state only. If server-ID is not specified, this command starts the current server. Here is the syntax for this command:
START SERVER; |
START SERVER server-ID <(SAPW=password)>; |
START SERVER server-ID </ SAPW=password>; |
specifies the name of the quiesced server. For more information, see Specifying a Server.
must be a valid SAS name that is 1 to 8 characters in length. The value for this option is replaced by Xs in the log. To protect this password, you should use the security software at your site to limit access to the SAS program statements that create the server.
is an encoded version of a password. Using encoded passwords promotes security and enables you to store SAS programs that do not contain clear-text passwords.
To obtain an encoded password, specify the clear-text password as input to the PROC PWENCODE statement.
Here is an example of code for obtaining an encoded password:
proc PWENCODE in="srvmach"; run; {sas001}c2Vydm1hY2g=The clear-text password srvmach is specified in the PROC PWENCODE statement. The output is generated in the form {key}encoded-password . sas001 is the key, which is used to decode the encoded password to its clear-text form when the password is needed.
Note: The encoded password is case-sensitive. Use the entire generated output string, including the key.
Use the output from the PROC PWENCODE statement as the value for encoded-password in the appropriate statement.You cannot use the START SERVER command to restart a stopped server; instead, you must execute the SERVER procedure.
Alias: | ST SERVER |
Stopping a Server |
You use the STOP SERVER command to terminate a server immediately. If users are currently reading from or writing to members in the server library, the server closes the members and updates might be lost. The server releases the libraries held by each user and disconnects each user. Here is the syntax for this command:
STOP SERVER; |
STOP SERVER server-ID <(SAPW=password)>; |
STOP SERVER server-ID </ SAPW=password>; |
specifies the name of the server to be terminated. If server-ID is not specified, this command terminates the current server. For more information, see Specifying a Server.
must be a valid SAS name that is 1 to 8 characters in length. The value for this option is replaced by Xs in the log. To protect this password, you should use the security software at your site to limit access to the SAS program statements that create the server.
is an encoded version of a password. Using encoded passwords promotes security and enables you to store SAS programs that do not contain clear-text passwords.
To obtain an encoded password, specify the clear-text password as input to the PROC PWENCODE statement.
Here is an example of code for obtaining an encoded password:
proc PWENCODE in="srvmach"; run; {sas001}c2Vydm1hY2g=The clear-text password srvmach is specified in the PROC PWENCODE statement. The output is generated in the form {key}encoded-password . sas001 is the key, which is used to decode the encoded password to its clear-text form when the password is needed.
Note: The encoded password is case-sensitive. Use the entire generated output string, including the key.
Use the output from the PROC PWENCODE statement as the value for encoded-password in the appropriate statement.Note: For Windows NT, Windows 2000, and z/OS operating environments, the SAS/SHARE server also responds to console STOP commands. This means that you do not have to use PROC OPERATE to terminate a SAS/SHARE server. For more information, see SAS/SHARE Server Can Run as a Windows Service.
Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.