$Session List: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
No edit summary
 
(33 intermediate revisions by 3 users not shown)
Line 2: Line 2:
<span class="pageSubtitle">Get list of sessions</span>
<span class="pageSubtitle">Get list of sessions</span>


<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="warn"><b>Note:</b> Many $functions have been deprecated in favor of Object Oriented methods. But there is no OO equivalent for the $Session_List function.</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_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.  


The first argument is the $list identifier to receive the output from <var>$Session_List</var>. This is a required argument.  
==Syntax==
<p class="syntax"><span class="term">%rc</span> = <span class="literal">$Session_List</span>(<span class="term">listid</span>, [<span class="term">sesid</span>], [<span class="term">owner</span>])
</p>
 
<table>
<tr><th>%rc</th>
<td>A numeric variable that is set to the number of added items.</td></tr>
 
<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 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.  
<tr><th>sesid</th>
<td>The identifier of the session for which information is to be returned. This argument can contain wildcards &mdash; for example <code>PEQ*</code> 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>


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.
<tr><th>owner</th>
==Syntax==
<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 class="syntax"><section begin="syntax" />%rc = $Session_List(listid, sesid, owner)
<p>
<section end="syntax" /></p>
This is an optional argument and defaults to the userid of the invoking user. </p></td></tr>
<p class="caption">$Session_List
</table>
</p>
 
<p class="caption">%RC is set to the number of added items.</p>
===Output format===
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="thJustBold">
<tr><th>Col 1-10</th>
<tr><th>Col 1-10</th>
<td>Owner of the session; * for public sessions.</td></tr>
<td>Owner of the session; <code>*</code> for public sessions.</td></tr>
 
<tr><th>Col 11-16</th>
<tr><th>Col 11-16</th>
<td>Session timeout value.</td></tr>
<td>Session timeout value.</td></tr>
<tr><th>Col 17-30</th>
<tr><th>Col 17-30</th>
<td>Session creation time in YYYYMMDDHHMISS format.</td></tr>
<td>Session creation time in YYYYMMDDHHMISS format.</td></tr>
<tr><th>Col 31-44</th>
<tr><th>Col 31-44</th>
<td>Last session access time in YYYYMMDDHHMISS format. If the session is currently open this value is the time of the <var>$Session_List</var> invocation and will have the same value for all sessions open at the time of the <var>$Session_List</var> call.</td></tr>
<td>Last session access time in YYYYMMDDHHMISS format. If the session is currently open this value is the time of the <var>$Session_List</var> invocation and will have the same value for all sessions open at the time of the <var>$Session_List</var> call.</td></tr>
<tr><th>Col 45-50</th>
 
<tr><th nowrap>Col 45-50</th>
<td>User number with session open. If the session is not currently open by any users these columns contain all blanks.</td></tr>
<td>User number with session open. If the session is not currently open by any users these columns contain all blanks.</td></tr>
<tr><th>Col 51-</th>
<tr><th>Col 51-</th>
<td>The session id.
<td>The session ID.</td></tr>
</td></tr></table>
</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>
<table class="syntaxTable">
<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="thJustBold">
<tr><th>*</th>
<tr><th>*</th>
<td>Matches any number of characters including none</td></tr>
<td>Matches any number of characters including none</td></tr>
<tr><th>?</th>
<tr><th>?</th>
<td>Matches any single character</td></tr>
<td>Matches any single character</td></tr>
<tr><th>"</th>
<tr><th>"</th>
<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>
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.
</table>
For example:
<ul>
<li><code>C*D</code> matches "CUSTID", "COD", or "CLOD". </li>
 
<li><code>S??T</code> matches "SALT", "SLOT", or "SORT". </li>
 
<li><code>"*</code> matches "*" (that is, public sessions, in the case of the owner).</li>
</ul></li>
</ul>
 
==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>


 
==Products authorizing {{PAGENAMEE}}==
For more information about sessions
<ul class="smallAndTightList">
 
<li>[[List of $functions|Sirius functions]]</li>
This $function is new in <var class="product">[[Sirius Mods]]</var> Version 6.3.
<h2>Products authorizing {{PAGENAMEE}}</h2><ul class="smallAndTightList">
<li>[[Sirius functions]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Janus Open Client]]</li>
<li>[[Media:JoclrNew.pdf|Janus Open Client]]</li>
<li>[[Janus Open Server]]</li>
<li>[[Media:JosrvrNew.pdf|Janus Open Server]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Web Server]]</li>
<li>[[Janus Web Server]]</li>
<li>[[Japanese functions]]</li>
<li>Japanese functions</li>
<li>[[Sir2000 Field Migration Facility]]</li>
<li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li>
 
</ul>
</ul>
<p class="caption">Products authorizing $Session_List
</p>




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

Latest revision as of 21:56, 7 December 2021

Get list of sessions

Note: Many $functions have been deprecated in favor of Object Oriented methods. But there is no OO equivalent for the $Session_List function.

$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)

Products authorizing $Session_List