Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Introduction to Switches (↑ RTS Switches)
◄Back► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
When you run a program you can set switches to control its
behavior. These are called run-time switches, or Run-Time System
(RTS) switches. Most affect the behavior of COBOL features. A
few are for explicit reference by the program; these are called
the COBOL programmable switches.
You enter the switches either on the command line or in the
environment variable COBSW before you run your program. They
remain set during subprograms. Switch settings on the
command line take precedence over those in COBSW.
The syntax for setting switches on the command line is:
({ {+|-|/}s }...)
To set switches in COBSW use the following O/S command:
SET COBSW={ {+|-|/}s }...
The notation used above is as follows:
{ | } Choose one of the items either side of the |.
{ }... You can repeat this item.
s is a switch. + sets it on, - sets it off. It can be a digit,
a letter (upper- or lower-case), or a letter followed by a digit
in the range 0 through 7. A letter is equivalent to the same
letter followed by the digit 0. For example B, b, B0, b0 all
refer to the same switch.
For example, the command:
MYPROG (+T-K1+F)
loads program MYPROG with switches T and F on and K1 off.
Switches preceded with / are known as numeric switches. These are a
single letter followed by an integer with value 0 thru 65535. You
use these switches to set certain variable quantities used by the
run-time system.
-♦-