SPDO Procedure

Example 1: Using PROXY Statements to Get Information about Non-Locking SPD Server Users

Features:

LIST USER statement

SET USER statement

SHOWLIBNAME statement with _ALL_ option

SHOWLIBNAME statement with /DUMP option

SHOWLIBNAME statement with /DATA option

Details

Here are examples of proxy statements that an administrator might submit to get information about non-locking users. They are presented in an order that would be typical for an administrator who is gathering user proxy information before issuing proxy commands on the user’s behalf.
1. List the users on the host that you are interested in.The following code requests to list all of the users for the SPD Server host named Sunburn.6200. The host is identified in the HOST= LIBNAME option. The code also specifies the ACLSPECIAL= LIBNAME option.
libname example sasspds
  host='sunburn'
  serv='6100'
  user='sassyl'
  passwd='abc123'
  aclspecial=YES;

proc spdo lib=example;
list users;
The following output is written to the log:
Users Currently Connected to SPD Server
UserName Pid   Portno
----------------------------------------
SASSYL   17704 58382
SASSYL   17614 58298
SASSYL   17613 58293
ANONYMOU 17611 58288
ANONYMOU 17610 58283
2. Set the user.The following code sets the user to ANONYMOU and specifies process ID (PID) 17610:
set user anonymou 17610;
The following message is written to the log:
NOTE: User ANONYMOU connected to proxy operator port with pid=17610.
3. List the active librefs for the user with the SHOWLIBNAMES statement. This code submits the SHOWLIBNAME statement with the _ALL_ option to list every libref for user ANONYMOU for this proxy.
showlibname _all_;
The following output is written to the log:
LIBREF(FOO):Pathname assigned=/bigdisk/test/qabig1_dev/
LIBREF(FOO):ACL Owner=
LIBREF(FOO):ACL Defaults(R,W,A,C)=(Y,Y,Y,Y)
4. List the open tables in a libref.This code submits the SHOWLIBNAME statement with libref FOO and the DATA= _ALL_ option to show all of the open tables in libref FOO.
showlibname FOO/data=_all_;
The code might return a message similar to the following in the log:
NOTE: No data sets currently opened for LIBREF FOO.
5. List the accessible tables in the libref.This code submits the SHOWLIBNAME statement with libref FOO and the /DUMP option to show all of the accessible tables in libref FOO.
showlibname FOO/dump=_all_;
The following output is written to the log:
LIBREF(FOO):Dataset name=BIGX
LIBREF(FOO):ACL Owner=ANONYMOU
LIBREF(FOO):ACL Defaults(R,W,A,C)=(N,N,N,N)
LIBREF(FOO):Dataset name=X
LIBREF(FOO):ACL Owner=ANONYMOU
LIBREF(FOO):ACL Defaults(R,W,A,C)=(N,N,N,N)
6. Submit a request and list the open tables in the libref FOO.User ANONYMOU issues a WHERE clause on the table BIGX. Submit the SHOWLIBNAME statement on libref FOO again with the /DATA option.
showlibname FOO/data=_all_;
The following output is written to the log:
LIBREF(FOO):Dataset name=BIGX
LIBREF(FOO):ACL Owner=ANONYMOU
LIBREF(FOO):ACL Defaults(R,W,A,C)=(N,N,N,N)
LIBREF(FOO):WHERE clause read thread active
7. Get detailed information.Submit the SHOWLIBNAME statement on libref FOO again and specify table BIGX in the /DATA= option.
showlibname FOO/data=bigx;
The following output is written to the log:
LIBREF(FOO):Dataset name=BIGX
LIBREF(FOO):ACL Owner=ANONYMOU
LIBREF(FOO):ACL Defaults(R,W,A,C)=(N,N,N,N)
LIBREF(FOO):WHERE clause read thread active
LIBREF(FOO):Type=
LIBREF(FOO):Label=
LIBREF(FOO):Number observations=5000000
LIBREF(FOO):Observation length=41
LIBREF(FOO):Wire blocksize=32718
LIBREF(FOO):Wire block factor=798
LIBREF(FOO):Data port number=58392
LIBREF(FOO):Active data socket=33
LIBREF(FOO):Metafile=/bigdisk/test/qabig1_dev/bigx.mdf.0.0.0.spds9
LIBREF(FOO):Metafile size=31
LIBREF(FOO):Datafile=
  /spds02/test/qabig1_dev/bigx.dpf._bigdisk_test_qabig1_dev.0.1.spds9:
  /spds03/test/qabig1_dev/bigx.dpf._bigdisk_test_qabig1_dev.1.1.spds9:
  /spds04/test/qabig1_dev/bigx.dpf._bigdisk_test_qabig1_dev.2.1.spds9:
  /spds01/test/qabig1_dev/bigx.dpf._bigdisk_test_qabig1_dev.3.1.spds9:
  /spds02/test/qabig1_dev/bigx.dpf._bigdisk_test_qabig1_dev.4.1.spds9:
  /spds03/test/qabig1_dev/bigx.dpf._bigdisk_test_qabig1_dev.5.1.spds9:
  /spds04/test/qabig1_dev/bigx.dpf._bigdisk_test_qabig1_dev.6.1.spds9:
  /spds01/test/qabig1_dev/bigx.dpf._bigdisk_test_qabig1_dev.7.1.spds9:
  /spds02/test/qabig1_dev/bigx.dpf._bigdisk_test_qabig1_dev.8.1.spds9:
  /spds03/test/qabig1_dev/bigx.dpf._bigdisk_test_qabig1_dev.9.1.spds9:
  /spds04/test/qabig1_dev/bigx.dpf._bigdisk_test_qabig1_dev.10.1.spds9:
  /spds01/test/qabig1_dev/bigx.dpf._bigdisk_test_qabig1_dev.11.1.spds9:
  /spds02/test/qabig1_dev/bigx.dpf._bigdisk_test_qabig1_dev.12.1.spds9
LIBREF(FOO):Datafile size=200196
LIBREF(FOO):Number of Indexes=0
Last updated: February 3, 2017