$Session List: Difference between revisions
(Automatically generated page update) |
mNo edit summary |
||
Line 4: | Line 4: | ||
<p class="warn"><b>Note: </b>Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Session_List function is [[to be entered]].</p> | <p class="warn"><b>Note: </b>Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Session_List function is [[to be entered]].</p> | ||
<var>$ | <var>$Session_List</var> returns information about [[Sessions|sessions]] to a $list, accepts three arguments and returns a the number of items added to the output $list. All errors result in request cancellation. | ||
==Syntax== | ==Syntax== | ||
Line 10: | Line 10: | ||
</p> | </p> | ||
< | <table> | ||
<tr><th>%rc</th> | |||
<td>A numeric variable that is set to the number of added items.</td></tr> | |||
The | <tr><th>listid</th> | ||
<td>The identifier of the $list to receive the output from <var>$Session_List</var>. This is a required argument.</td></tr> | |||
The | <tr><th>sesid</th> | ||
<td>The identifier of the session for which information is to be returned. This argument can contain wildcards — for example "PEQ*" indicates that information is to be returned for all sessions beginning with the letters "PEQ". | |||
<p> | |||
This is an optional argument and defaults to asterisk (<tt>*</tt>), which means all session IDs are to be listed. </p> | |||
</td></tr> | |||
<tr><th>owner</th> | |||
<td>The userid that owns the session for which information is to be returned. This argument can contain wildcards, though for a non-system manager user, only sessions owned by the requesting user and public sessions will be listed. Note that an asterisk (<tt>*</tt>) value will list all private and public sessions, but a double-quote asterisk (<tt>"*</tt>) will list public sessions only. | |||
<p> | |||
This is an optional argument and defaults to the userid of the invoking user. </p></td></tr> | |||
</table> | |||
===Output format=== | ===Output format=== | ||
Line 60: | Line 72: | ||
%rc = $List_Print(%list) | %rc = $List_Print(%list) | ||
</p> | </p> | ||
==Products authorizing {{PAGENAMEE}}== | ==Products authorizing {{PAGENAMEE}}== |
Revision as of 20:45, 19 July 2013
Get list of sessions
Note: Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Session_List function is to be entered.
$Session_List returns information about sessions to a $list, accepts three arguments and returns a the number of items added to the output $list. All errors result in request cancellation.
Syntax
%rc = $Session_List(listid, [sesid], [owner])
%rc | A numeric variable that is set to the number of added items. |
---|---|
listid | The identifier of the $list to receive the output from $Session_List. This is a required argument. |
sesid | The identifier of the session for which information is to be returned. This argument can contain wildcards — for example "PEQ*" indicates that information is to be returned for all sessions beginning with the letters "PEQ".
This is an optional argument and defaults to asterisk (*), which means all session IDs are to be listed. |
owner | The userid that owns the session for which information is to be returned. This argument can contain wildcards, though for a non-system manager user, only sessions owned by the requesting user and public sessions will be listed. Note that an asterisk (*) value will list all private and public sessions, but a double-quote asterisk ("*) will list public sessions only.
This is an optional argument and defaults to the userid of the invoking user. |
Output format
The format of the data in the output $list is
Col 1-10 | Owner of the session; * for public sessions. |
---|---|
Col 11-16 | Session timeout value. |
Col 17-30 | Session creation time in YYYYMMDDHHMISS format. |
Col 31-44 | Last session access time in YYYYMMDDHHMISS format. If the session is currently open this value is the time of the $Session_List invocation and will have the same value for all sessions open at the time of the $Session_List call. |
Col 45-50 | User number with session open. If the session is not currently open by any users these columns contain all blanks. |
Col 51- | The session id. |
Usage notes
- The session ID and owner specified in the second and third arguments can be explicit names or can contain the following wildcard characters:
* Matches any number of characters including none ? Matches any single character " Indicates that the next character must be treated literally even if it is a wildcard character. For example,
C*D
matches "CUSTID", "COD" or "CLOD".S??T
matches "SALT", "SLOT" or "SORT"."*
matches "*" (that is, public sessions, in the case of the owner).
Example
The following example displays information about all sessions owned by the current user:
%list = $ListNew %rc = $Session_List(%list) %rc = $List_Print(%list)