Turn user switches on/off
Component: | BS2000 |
Functional area: | User management |
Domain: | USER-ADMINISTRATION |
Privileges: | STD-PROCESSING |
Function
With the MODIFY-USER-SWITCHES command, users can set their user switches (ON), clear them (OFF) or invert them (INVERT).
For each user ID there are 32 user switches available (numbered 0 to 31), whose settings can be changed by every job running under the user ID. If a new user ID is created by systems support or if the system is newly generated, all user switches are cleared (value OFF).
User switches are not cleared at the end of a job (job switches are cleared at the end of a job; see section "Job switches").
The current settings of the user switches can be queried using SHOW-USER-SWITCHES. It is also possible to query the user switches of other user IDs.
Privileged functions
Systems support staff working under the TSOS user ID can modify the user switches of any user ID (USER-IDENTIFICATION operand).
Format
MODIFY-USER-SWITCHES | Alias: MDUSW |
USER-IDENTIFICATION = *OWN / <name 1..8> ,ON = *UNCHANGED / list-poss(32): <integer 0..31> ,OFF = *UNCHANGED / list-poss(32): <integer 0..31> ,INVERT = *UNCHANGED / list-poss(32): <integer 0..31> |
Operands
USER-IDENTIFICATION = *OWN / <name 1..8>
User ID whose user switches are to be set according to the entries for the operands ON, OFF and INVERT.
The default value is *OWN, i.e. the user ID of the calling task. Nonprivileged users can only explicitly specify their own user ID.
ON = *UNCHANGED / list-poss(32): <integer 0..31>
User switches to be set to ON.
OFF = *UNCHANGED / list-poss(32): <integer 0..31>
User switches to be set to OFF.
INVERT = *UNCHANGED / list-poss(32): <integer 0..31>
User switches to be inverted.
The user switches specified are set from ON to OFF or from OFF to ON.
Return codes
(SC2) | SC1 | Maincode | Meaning |
---|---|---|---|
0 | CMD0001 | Command executed | |
2 | 0 | CMD0002 | Command executed; error in WHEN queue (error possible for tasks waiting for this event) |
1 | CMD0202 | Contradictory entries | |
32 | EXC0041 | System error | |
64 | EXC0868 | User ID not found | |
130 | CMD2382 | User switches not available because the user ID is locked |
Note
A user switch can be modified explicitly only once in a MODIFY-USER-SWITCHES command, i.e. switched on or off or inverted.
Example
/show-user-sw —————————————————————————————————————————— (1)
% USER SWITCHES ON EQUAL- % 3, 4
/mod-user-sw on=(1,4),off=3 —————————————————————————————— (2)
/show-user-sw
% USER SWITCHES ON EQUAL- % 1, 4
/mod-user-sw invert=(2,3,4) ——————————————————————————————— (3)
/show-user-sw
% USER SWITCHES ON EQUAL- % 1, 2, 3
(1) | Switches 3 and 4 were already set to ON. |
(2) | Switches 1 and 4 are set to ON (note that switch 4 is already ON), switch 3 is set to OFF. |
(3) | Switches 2, 3 and 4 are inverted. |