Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

SETSW - Set job 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 switches assigned to their job on or off, or invert them, using the SETSW macro.

Macro format and description of operands

SETSW

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

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”.

no
Number of a job switch which is to be changed. The job 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).

Calling the macro without operands:

Instead of specifying the operands, the user may specify the desired settings of all job switches in register R0. The job 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 SETSW macro is transferred in the rigtmost byte of register R15.

X'aa'

Meaning

X'00'

The switch setting was changed as desired.

X'04'

Operand error. The switch setting was not executed.

X'20'

Internal error.