$Bump: Difference between revisions
m (1 revision) |
mNo edit summary |
||
Line 2: | Line 2: | ||
<span class="pageSubtitle"><section begin="desc" />Bump a user<section end="desc" /></span> | <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. | <p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is currrently no OO equivalent for the $Bump function as we have yet to implement a User Class.</p> | ||
The $Bump function allows a privileged user (system manager or system administrator) to bump another user as with the BUMP command. | The $Bump function allows a privileged user (system manager or system administrator) to bump another user as with the BUMP command. | ||
Line 17: | Line 17: | ||
</p> | </p> | ||
<p class="caption">%RESULT is set to indicate the success of the function.</p> | <p class="caption">%RESULT is set to indicate the success of the function.</p> | ||
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> | 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> | ||
Line 27: | Line 26: | ||
</p> | </p> | ||
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' ) | ||
Line 34: | Line 33: | ||
</p> | </p> | ||
<p class="code"> | <p class="code"> | ||
[[Category:$Functions|$Bump]] | [[Category:$Functions|$Bump]] |
Revision as of 16:59, 31 January 2011
<section begin="desc" />Bump a user<section end="desc" />
Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is currrently no OO equivalent for the $Bump function as we have yet to implement a User Class.
The $Bump function allows a privileged user (system manager or system administrator) to bump another user as with the BUMP command.
$Bump accepts one or two arguments and returns a numeric code.
The first argument is the number of the user to be bumped.
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
<section begin="syntax" /> %RESULT = $Bump(user_num, userid) <section end="syntax" />
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.
0 - User bumped 1 - User not found 2 - Not privileged to issue BUMP command
The following program bumps userid 'HOMER' with user number 13.
B %RC = $Bump( 13, 'HOMER' ) END