Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

SETUS - Set user switch

&pagelevel(4)&pagelevel

General

Application area:

User and job switches; see "User and job switches"

Macro type:

Type R; see "R-type macros"


  • As of BS2000/OSD-BC V1.0, the new macro SWITCH is available. This macro combines the functionality of the GETSW, GETUS, SETSW and SETUS macros.

Macro description

Users can set any of the user switches assigned to their user ID on or off, or invert them, using the SETUS macro.

Macro format and description of operands

SETUS

[{ON=(no,...,no) / OFF=(no,...,no) / INVERT=(no,...,no)}

no
Number of a user switch which is to be changed. The user switches are numbered
0 through 31.
Several switches may be specified in any order or as a consecutive series of switches (e.g. 3-8).

ON=(...)
The switches specified are set to “on”.

OFF=(...)
The switches specified are set to “off”.

INVERT=(...)
The switches specified are set to “on” if they were “off” and to “off” if they were “on.

Calling the macro without operands:

Instead of specifying the operands, the user may specify the desired settings of all user switches in register R0. The user switches correspond to the bits of the register, reading from right to left.

bit 2 (0)  -->  switch 0
bit 2 (1)  -->  switch 1
   :              :
   :              :
bit 2 (31) -->  switch 31

where:
bit 2n = 0: switch n off
bit 2n = 1: switch n on
0 <= n <= 31

Return information and error flags

R15:

+---------------+
|   |   |   |   |
|0|0|0|0|0|0|a|a|
+---------------+

A return code relating to the execution of the SETUS macro is transferred in the rigtmost byte of register R15.

X'aa'

Meaning

X'00'

The switch setting was changed as desired.

X'04'

a) Operand error. The switch setting was not executed.
b) The switch settings affect one of the user' s jobs which is in the WHEN queue.

The specified switch settings have been executed.

X'20'

Internal error.