$Session List: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 4: Line 4:
<p class="warning">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="warning">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>$Session_Create</var> 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.  
<var>$Session_Create</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==
<p class="syntax"><section begin="syntax" />%rc = $Session_List(listid, sesid, owner)
<section end="syntax" /></p>
<p>%rc is set to the number of added items.</p>
The first argument is the $list identifier to receive the output from <var>$Session_List</var>. This is a required argument.  
The first argument is the $list identifier to receive the output from <var>$Session_List</var>. This is a required argument.  


Line 11: Line 16:


The third argument is the session owner 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 a "*" will list all private and public sessions but a ""*" will list public sessions only. This is an optional argument and defaults to the userid of the invoking user.
The third argument is the session owner 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 a "*" will list all private and public sessions but a ""*" will list public sessions only. This is an optional argument and defaults to the userid of the invoking user.
==Syntax==
 
<p class="syntax"><section begin="syntax" />%rc = $Session_List(listid, sesid, owner)
===Output format===
<section end="syntax" /></p>
<p class="caption">$Session_List
</p>
<p>%RC is set to the number of added items.</p>
The format of the data in the output $list is
The format of the data in the output $list is
<table class="syntaxTable">
<table class="syntaxTable">
Line 33: Line 34:
</td></tr></table>
</td></tr></table>


 
==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:
<ul>
<li>The session ID and owner specified in the second and third arguments can be explicit names or can contain the following wildcard characters:
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>*</th>
<tr><th>*</th>
Line 43: Line 45:
<td>Indicates that the next character must be treated literally even if it is a wildcard character.
<td>Indicates that the next character must be treated literally even if it is a wildcard character.
</td></tr></table>
</td></tr></table>
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.
For example, <code>C*D</code> matches "CUSTID", "COD" or "CLOD". <code>S??T</code> matches "SALT", "SLOT" or "SORT". <code>"*</code> 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:
The following example displays information about all sessions owned by the current user:
<p class="code"> %LIST = $ListNew
<p class="code">%LIST = $ListNew
%RC = $Session_List(%LIST)
%RC = $Session_List(%LIST)
%RC = $List_Print(%LIST)
%RC = $List_Print(%LIST)
</p>
</p>




For more information about sessions
This $function is new in <var class="product">[[Sirius Mods]]</var> Version 6.3.
<h2>Products authorizing {{PAGENAMEE}}</h2><ul class="smallAndTightList">
<h2>Products authorizing {{PAGENAMEE}}</h2><ul class="smallAndTightList">
<li>[[Sirius functions]]</li>
<li>[[Sirius functions]]</li>
Line 63: Line 64:
<li>[[Japanese functions]]</li>
<li>[[Japanese functions]]</li>
<li>[[Sir2000 Field Migration Facility]]</li>
<li>[[Sir2000 Field Migration Facility]]</li>
</ul>
</ul>
<p>
</p>




[[Category:$Functions|$Session_List]]
[[Category:$Functions|$Session_List]]

Revision as of 20:41, 29 October 2012

Get list of sessions

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_Create 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

<section begin="syntax" />%rc = $Session_List(listid, sesid, owner) <section end="syntax" />

%rc is set to the number of added items.

The first argument is the $list identifier to receive the output from $Session_List. This is a required argument.

The second argument is the session id 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 "*" meaning all session ids are to be listed.

The third argument is the session owner 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 a "*" will list all private and public sessions but a ""*" 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)


    Products authorizing $Session_List