RSESSION SCL Function
Returns the name, description, and SAS version of
a SAS/CONNECT server session.
Client: |
optional |
Server: |
optional |
Syntax
Syntax Description
- cval
-
is the character string
that contains the following information:
- characters 1 through 17
-
are the session identifier
(REMOTE= server-ID).
- characters 18 through 57
-
are the description.
- characters 58 through 61
-
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.
Details
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;