Chapter Contents

Previous

Next
RSESSION SCL Function

RSESSION SCL Function



Returns the name, description, and SAS System version of a remote session.

Local and remote


Syntax
Syntax Description
Example

Syntax

cval=RSESSION(n);

Syntax Description

cval
is the character string that contains the following information:

characters 1 through 8
the session identifier (REMOTE=remote-session-id)

characters 9 through 40
the description

n
is the number of the remote session to get session information for. If no remote link exists, the returned value is blank. If a link exists but no description was specified, characters 9 through 40 in the returned value are blanks.

Details

The RSESSION function returns the session identifier and corresponding description for a remote session. You must have previously defined the description by using the RSTITLE function.


Example

This example loops through four sessions and gets the remote 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 remote sessions to upload to).

do i=1 to 4;
   word=rsession(i);
   if word ^=' ' then do;
      remote=substr(word,1,8);
      desc=(substr(word,9,20));
      if rlink(remote) then do;
         if desc=' ' then desc = remote;
         cnt=cnt + 1;
         entrys{cnt}=remote;
         comam{cnt}=desc;
      end;
   end;
end;


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.