You can specify switches:
- In the project's
properties in the IDE. These switch settings are built into your application and are the defaults used for your application. These settings can be overridden when you run the application.
- In the environment variables COBSW and OOSW (for switches for object-oriented programs). These switch settings take effect when you start the application. We recommend that for switches affecting file handling, you do not use COBSW, but edit the file handler configuration file Extfh instead.
The following command sets the programmable switches 1 and 4 on, and all the others (2, 3, 5-8) are off by default:
- On the command line. These switch settings take effect when you start the application. Switch settings on the command line take precedence over those in COBSW.
For example, the following command loads the program
myprog with programmable switches 5 and 7 on and switch 2 off, and all the others (0, 1, 3, 4, 6 and 8) are off by default. Note that switch 7 is turned on, since the last setting of it (that is +7) is the one used.
UNIX:
cobrun -2+5-7+7 ./myprog
The following command loads the program
myprog with switch T on and switch O off:
myprog (+T-O)