$Bump: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:$Bump}} <span class="pageSubtitle"><section begin="desc" />Bump a user<section end="desc" /></span> <p class="warning">Most Sirius $functions have been deprecated...")
 
No edit summary
 
(38 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:$Bump}}
<span class="pageSubtitle"><section begin="desc" />Bump a user<section end="desc" /></span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Bump function is [[to be entered]].</p>
<span class="pageSubtitle">Bump a user</span>


The $Bump function allows a privileged user (system manager or system administrator) to bump another user as with the BUMP command.  
<p class="warn"><b>Note:</b> Many $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the <var>$Bump</var> function as no User class is implemented.</p>


$Bump accepts one or two arguments and returns a numeric code.  
The <var>$Bump</var> function allows a privileged user (system manager or system administrator) to bump another user just as the <var>[[BUMP command|BUMP]]</var> command does.  


The first argument is the number of the user to be bumped.  
<var>$Bump</var> accepts one or two arguments and returns a numeric code.  


The second argument is an optional userid. If this argument is provided, the user number indicated by argument one will only be bumped if the userid matches the second argument. This helps prevent accidentally bumping a user that just logged onto a thread previously occupied by another user.
==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" /> %RESULT = $Bump(user_num, userid)
<p class="syntax"><span class="term">%result</span> = <span class="literal">$Bump</span>(<span class="term">user_num</span>, [<span class="term">userid</span>])
<section end="syntax" /></p>
<p class="caption">$Bump Function
</p>
</p>
<p class="caption">%RESULT is set to indicate the success of the function.</p>


<table>
<tr><th>%result</th>
<td>A numeric value (see [[#Return codes|Return codes]]) that indicates the success of the function.</td></tr>


The behavior of $Bump is affected by the FUNCOPTS system parameter: If the FUNCOPTS X'01' bit is set, a caller of $Bump can bump any thread that has the same user ID as that of the caller, whether or not the caller is a system administrator or system manager.<p>
<tr><th>user_num</th>
0 - User bumped
<td>The number of the user to be bumped. </td></tr>
1 - User not found
 
2 - Not privileged to issue BUMP command
<tr><th>userid</th>
</p>
<td>An optional [[USERID parameter|user ID]]. If this argument is provided, the user indicated by <var class="term">user_num</var> is bumped only if the user ID matches <var class="term">userid</var>. This helps prevent accidentally bumping a user that just logged onto a thread previously occupied by another user. </td></tr>
<p class="caption">$Bump return codes
</table>
 
===Return codes===
<p class="code">0 - User bumped
1 - User not found
2 - Not privileged to issue BUMP command
</p>
</p>


==Usage notes==
The behavior of <var>$Bump</var> is affected by the <var>[[FUNCOPTS parameter|FUNCOPTS]]</var> system parameter: If the <var>FUNCOPTS</var> X'01' bit is set, a caller of <var>$Bump</var> can bump any thread that has the same user ID as that of the caller, whether or not the caller is a system administrator or system manager.
==Example==
The following program bumps user ID <code>HOMER</code> that has user number 13:


The following program bumps userid 'HOMER' with user number 13.
<p class="code">B
<p class="code"> B
%RC = $Bump( 13, 'HOMER' )
%RC = $Bump( 13, 'HOMER' )
END
END
</p>
</p>
<p class="code">


<ul>
==Products authorizing {{PAGENAMEE}}==
 
<ul class="smallAndTightList">
<li>&SFUNC
<li>[[SirMon|SirMon]]</li>


</ul>
</ul>
<p>
</p>
<p class="caption">Products authorizing $Bump
</p>
</p>




[[Category:$Functions|$Bump]]
[[Category:$Functions|$Bump]]

Latest revision as of 13:09, 7 November 2018

Bump a user

Note: Many $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the $Bump function as no User class is implemented.

The $Bump function allows a privileged user (system manager or system administrator) to bump another user just as the BUMP command does.

$Bump accepts one or two arguments and returns a numeric code.

Syntax

%result = $Bump(user_num, [userid])

%result A numeric value (see Return codes) that indicates the success of the function.
user_num The number of the user to be bumped.
userid An optional user ID. If this argument is provided, the user indicated by user_num is bumped only if the user ID matches userid. This helps prevent accidentally bumping a user that just logged onto a thread previously occupied by another user.

Return codes

0 - User bumped 1 - User not found 2 - Not privileged to issue BUMP command

Usage notes

The behavior of $Bump is affected by the FUNCOPTS system parameter: If the FUNCOPTS X'01' bit is set, a caller of $Bump can bump any thread that has the same user ID as that of the caller, whether or not the caller is a system administrator or system manager.

Example

The following program bumps user ID HOMER that has user number 13:

B %RC = $Bump( 13, 'HOMER' ) END

Products authorizing $Bump