SAS Component Language (SCL) Functions and Options |
Client: | Optional |
Server: | Optional |
Syntax | |
Syntax Description | |
Example |
Syntax |
cval=RSESSION(n); |
is the character string that contains the following information:
are the number of the server session to get session information for. If no connection exists, the returned value is blank. If a connection exists but no description was specified, characters 58 through 61 in the returned value are blanks.
The RSESSION function returns the session identifier and the corresponding description for a SAS/CONNECT server session. You must have previously defined the description by using the RSTITLE function.
Example |
This example loops through four sessions and obtains the server session and description, which is returned by using the RSESSION function. The program puts the descriptions in separate arrays for later use (for example, to display a choice of server sessions to upload to).
do i=1 to 4; word=rsession(i); if word ^=' ' then do; remote=substr(word,1,17); desc=(substr(word,18,57)); if rlink(remote) then do; if desc=' ' then desc = remote; cnt=cnt + 1; entrys{cnt}=remote; comam{cnt}=desc; end; end; end;
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.