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 and user switches

&pagelevel(3)&pagelevel

The @SETSW statement is used to set or reset user and job switches.

Operation

Operands

F mode, L mode

@SETSW

[ {ON | OFF}=] { [U] int1[-int2] } [,...]

ON

OFF

U

The specified switches are set (default value).

The specified switches are reset.

If U is specified then the subsequent input of int1 and possibly of int2
applies to a user switch under the user's own ID.

If U is not specified then the subsequent input of int1 and possibly of int2
applies to a job switch.

int1

int2

Number of the switch (0..31) that is to be set or reset.

All the switches between int1 and int2 (0..31) are set or reset. If int2
is smaller than int1, then the statement is rejected with the message
EDT3216.

Format 4 of the @IF statement can be used to check whether or not a job switch or user switch is set for the user's own ID.

In a @SETSW statement, it is possible to set or reset both user switches and job switches.

Example 1

@SET #I2 = 6

@SETSW ON = U1-#I2,12-20,U31

User switches 1 to 6 and 31 and job switches 12 to 20 are set.

Example 2

   1.     @SET #S2 = 'SWITCH 15 IS OFF'
   1.     @SET #S3 = 'SWITCH 15 IS ON
   1.     @PROC 9
   1.     @ @IF ON = 15 : @GOTO 4 --------------------------------------- (1)
   2.     @ @PRINT #S2 N
   3.     @ @RETURN
   4.     @ @PRINT #S3 N
   5.     @END
   1.     @SETSW OFF = 15 ----------------------------------------------- (2)
   1.     @DO 9 --------------------------------------------------------- (3)
SWITCH 15 IS OFF
   1.     @SETSW ON = 15 ------------------------------------------------ (4)
   1.     @DO 9 --------------------------------------------------------- (5)
SWITCH 15 IS ON
   1.
(1)

A procedure is stored in work file 9 that outputs the string variable #S3 if job switch 15 is set, and the string variable #S2 otherwise.

(2)Job switch 15 is reset.
(3)The procedure in work file 9 is executed.
(4)Job switch 15 is set.
(5)The procedure in work file 9 is executed.