LIBNAME Proxy Commands

Overview of Proxy Commands

To issue proxy commands, you must first select the SPD Server user proxy.
LIST USERS;
lists the proxy processes that are accessible to the PROC SPDO lib=<LIBNAME> statement that was dispatched from the SPD Server host. Accessible proxies are anonymous proxies and proxies that are owned by the LIBNAME owner. If the LIBNAME owner has ACLSPECIAL privileges, then all user proxies are listed.
SET USER user-ID [port-number];
enables you to use the port number to distinguish between two proxies that share the same user ID.
LIST USERS/LOCKING;
lists the user-locking proxy threads that are accessible by the PROC SPDO lib=<LIBNAME> statement that was dispatched from the SPD Server host and that were created with the LOCKING=YES LIBNAME option. Accessible proxies are anonymous proxies and proxies that are owned by the LIBNAME owner. If the LIBNAME owner has ACLSPECIAL privileges, then all user-locking proxies are listed. For each user-locking proxy thread, SPD Server returns the SPD Server user ID, the client login, and the thread ID. You can select a user-locking proxy thread from the LIST USERS list by submitting a command in the following form:
SET USER/LOCKING [user-ID threadID=#];
After a user-locking proxy is selected, you can get LIBNAME information by submitting the following commands:
SHOWLIBNAME libref | _ALL_;
SHOWLIBNAME libref / DATA=[ _ALL_| dsname];
SHOWLIBNAME libref / DUMP=[ _ALL_| dsname];
The value for libref is an explicit SPD Server LIBNAME name. Specify _ALL_ to see every currently assigned LIBNAME for the proxy.
If the /DATA= option is used with _ALL_, information about all of the open tables in the proxy for the given LIBNAME is displayed. If the /DATA= option is used with a data set name dsname, detailed information about the specified data set table is displayed.
If the /DUMP= option is used with _ALL_, information about all of the accessible tables in the proxy for the given LIBNAME is displayed. If the /DATA= option is used with a data set name dsname, detailed information about the specified data set table is displayed.

LIBNAME Proxy Command Examples

The following are examples of LIBNAME proxy commands that an administrator might use. They are presented in an order that would be typical of an administrator who is gathering user proxy information before issuing proxy commands on a user’s behalf.
  1. List all of the users for the server sunburn.6100:
    LIBNAME example sasspds
      host='sunburn'
      serv='6100'
      user='sassyl'
      passwd='abc123'
      aclspecial=YES;
    
    PROC SPDO lib=example;
    list users;
    
    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 to ANONYMOU and specify process ID (PID) 17610:
    set user anonymou 17610;
    
    NOTE: User ANONYMOU connected to proxy operator port with pid=17610.
  3. Show every LIBNAME for user ANONYMOU for this proxy:
    showlibname _all_;
    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. Show all of the open tables in LIBNAME FOO:
    showlibname FOO/data=_all_;
    
    NOTE: No data sets currently opened for LIBREF FOO.
  5. Show all of the accessible tables in LIBNAME FOO:
    showlibname FOO/dump=_all_;
    
    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. The user ANONYMOU issues a WHERE clause on the table BIGX. Show all of the open tables in LIBNAME FOO:
    showlibname FOO/data=_all_;
    
    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. User ANONYMOU performs a WHERE clause on the table BIGX and displays detailed information about the table BIGX:
    showlibname FOO/data=bigx;
    
    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
    
  8. List all locking users for the server sunburn.6100:
    list users/locking;
    
    Users Currently Connected to the Record Level Proxy
    SPDUserName  Client Login   Thread Id
    ----------------------------------------
    ANONYMOU     SASTEST        7
    TEST         SASTEST        8
    
  9. Set the user to ANONYMOU and specify thread ID 7:
    set user/locking anonymou threadid 7;
    
    NOTE: User ANONYMOU connected to record
    level proxy operator port with thread=7.
    
  10. Show every LIBNAME for locking user ANONYMOU:
    showlibname _all_;
    
    LIBREF(LOCKING):Pathname assigned=/bigdisk/test/qabig1/
    LIBREF(LOCKING):ACL Owner=
    LIBREF(LOCKING):ACL Defaults(R,W,A,C)=(Y,Y,Y,Y)
    
  11. Show all of the open tables in LIBNAME LOCKING:
    showlibname LOCKING/data=_all_;
    
    NOTE: No data sets currently opened for LIBREF LOCKING.