$Bind List: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:$Bind_List}} <span class="pageSubtitle"><section begin="desc" />Return list of bound semaphores onto a $list<section end="desc" /></span> <p class="warning">Most ...")
 
(Automatically generated page update)
 
(41 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:$Bind_List}}
{{DISPLAYTITLE:$Bind_List}}
<span class="pageSubtitle"><section begin="desc" />Return list of bound semaphores onto a $list<section end="desc" /></span>
<span class="pageSubtitle">Return list of bound semaphores onto a $list</span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Bind_List function is [[to be entered]].</p>
<p class="warn"><b>Note: </b>Many $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $Bind_List function.</p>


This function retrieves semaphores bound with $Bind by a specific or all users.  
This function retrieves semaphores bound with <var>[[$Bind]]</var> by a specific or all users.  


The $Bind_List function accepts three arguments and returns a number indicating the success of the function.  
The <var>$Bind_List</var> function accepts three arguments and returns a number indicating the success of the function.  


The first argument is the output $list identifier. If the output $list is not empty data is added to the end of the output $list. This is a required argument.  
==Syntax==
<p class="syntax"><span class="term">%rc</span> <span class="literal">= $Bind_List(</span><span class="term">olist</span>, <span class="squareb">[</span><span class="term">sem_name</span><span class="squareb">]</span>, <span class="squareb">[</span><span class="term">user_num</span><span class="squareb">]</span>)
</p>
 
===Syntax terms===
<table>
<tr><th>%rc</th>
<td>The number of items added to <var class="term">olist</var>, or a negative (error) [[#Return codes|return code]].</td></tr>
 
<tr><th>olist</th>
<td>The output [[$lists|$list]] identifier. If the output $list is not empty, data is added to the end of the $list. See [[#Usage notes|"Usage notes"]] for the $list format.</td></tr>
 
<tr><th>sem_name</th>
<td>The name of the semaphore for which information is to be returned. This value can be a single specific semaphore name, or it can be a wildcard string that matches a number of semaphores. The argument default value is asterisk (<tt>*</tt>), which means to return all semaphores bound by all users or by a specific user. </td></tr>
 
<tr><th>user_num</th>
<td>The user number of the user for which bound semaphores are to be returned. This optional argument defaults to -1, which means return semaphores bound by all users.</td></tr>
</table>


The second argument is the name of the semaphore for which information is to be returned. This argument can contain a single specific semaphore name or it can contain a wildcard string that matches a number of semaphores. This is an optional argument and defaults to "*" which means to return all semaphores bind by all or a specific user.
===Return codes===
<table>
<tr><td>>=0</td>
<td>Number of bound semaphores returned</td></tr>
<tr><td>-3</td>
<td>$list full or out of CCATEMP</td></tr>
</table>All other errors result in request cancellation


The third argument is the user number of the user for which bound semaphores are to be returned. This is an optional argument and defaults to -1 which means return semaphores bound by all users.
==Syntax==
<p class="syntax"><section begin="syntax" /> %RC = $Bind_List(olist, sem_name, user_num)
<section end="syntax" /></p>
<p class="caption">$Bind_List Function
</p>
<p class="caption">%RC is a number of items added to %OLIST, or is a negative error code.</p>
<p class="code">
>= 0 - Number of bound semaphores returned
-3 - $list full or out of CCATEMP
All other errors result in request cancellation
</p>
<p class="caption">$Bind_List return codes
</p>


==Usage notes==
<ul>
<li>The format of the <var class="term">olist</var> output $list is shown below:
<table> 
<tr><th>Offset</th><th>Contents</th>
<tr><td>0-4</td>
<td>The user number of the user that has the semaphore bound
represented as a string with leading zeros included.</td></tr>
<tr><td>5-14</td>   
<td>The userid of the user that has the semaphore bound
represented as a string padded with trailing blanks.</td></tr>
<tr><td>15-end</td> 
<td>The name of the bound semaphore.</td></tr>
</table> </li>


:bxtab lab="Output $list format" col1=17 :bxcol1 bold=yes.Offset :bxcol2 bold=yes.Contents :bxcol1.0 - 4 :bxcol2.The user number of the user that has the semaphore bound represented as a string with leading zeros included. :bxcol1.5 - 14 :bxcol2.The userid of the user that has the semaphore bound represented as a string padded with trailing blanks. :bxcol1.15 - end :bxcol2.The name of the bound semaphore. :ebxtab.
<li>The semaphore name specified in the second argument can be an explicit name or it can contain the following wildcard characters:


The semaphore name specified in the second argument can be an explicit name or it can contain the following wildcard characters:
<table>
<table class="syntaxTable">
<tr><td>*</td>
<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><td>?</td>
<td>Matches any single character</td></tr>
<td>Matches any single character</td></tr>
<tr><th>"</th>
 
<tr><td>"</td>
<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". "E"*CONCRETE" matches "E*CONCRETE".
</table>


The following code fragment retrieves all semaphores bound by the current user where the semaphore name ends with the letters "_TEMP" into a $list and sorts the $list by semaphore name.
For example:
<p class="code"> %RC = $Bind_List(%OLIST, '*_TEMP', $USER)
:<code>C*D</code> matches <code>CUSTID</code>, <code>COD</code> or <code>CLOD</code>.
:<code>S??T</code> matches <code>SALT</code>, <code>SLOT</code> or <code>SORT</code>.
%SLIST = $ListSort(%OLIST, '16,255, A')
:<code>E"*CONCRETE</code> matches <code>E*CONCRETE</code>. </li>
</ul>
 
==Example==
The following code fragment retrieves all semaphores bound by the current user where the semaphore name ends with the letters <code>_TEMP</code> into a $list and sorts the $list by semaphore name.
 
<p class="code">%rc = $Bind_List(%olist, '*_TEMP', $USER)
%slist = $ListSort(%olist, '16,255, A')
</p>
</p>


 
==Products authorizing {{PAGENAMEE}}==
$Bind_List is only available in Version 6.0 and later of the ''[[Sirius Mods]]''.
<ul class="smallAndTightList">
<ul class="smallAndTightList">
<li>[[Sirius functions]]</li>
<li>[[List of $functions|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 $Bind_List
</p>


[[Category:$Functions|$Bind_List]]
[[Category:$Functions|$Bind_List]]

Latest revision as of 22:51, 20 September 2018

Return list of bound semaphores onto a $list

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

This function retrieves semaphores bound with $Bind by a specific or all users.

The $Bind_List function accepts three arguments and returns a number indicating the success of the function.

Syntax

%rc = $Bind_List(olist, [sem_name], [user_num])

Syntax terms

%rc The number of items added to olist, or a negative (error) return code.
olist The output $list identifier. If the output $list is not empty, data is added to the end of the $list. See "Usage notes" for the $list format.
sem_name The name of the semaphore for which information is to be returned. This value can be a single specific semaphore name, or it can be a wildcard string that matches a number of semaphores. The argument default value is asterisk (*), which means to return all semaphores bound by all users or by a specific user.
user_num The user number of the user for which bound semaphores are to be returned. This optional argument defaults to -1, which means return semaphores bound by all users.

Return codes

>=0 Number of bound semaphores returned
-3 $list full or out of CCATEMP

All other errors result in request cancellation


Usage notes

  • The format of the olist output $list is shown below:
    OffsetContents
    0-4 The user number of the user that has the semaphore bound represented as a string with leading zeros included.
    5-14 The userid of the user that has the semaphore bound represented as a string padded with trailing blanks.
    15-end The name of the bound semaphore.
  • The semaphore name specified in the second argument can be an explicit name or it 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.
    E"*CONCRETE matches E*CONCRETE.

Example

The following code fragment retrieves all semaphores bound by the current user where the semaphore name ends with the letters _TEMP into a $list and sorts the $list by semaphore name.

%rc = $Bind_List(%olist, '*_TEMP', $USER) %slist = $ListSort(%olist, '16,255, A')

Products authorizing $Bind_List