
The Micro Focus run time switches are listed here numerically, you may browse them, click on the link to go directly to the error code or you may use the search feature of your browser to search for the information.
Sets the corresponding COBOL switch when the program is entered.
Properties: Default: All off Environment: AllRemarks: These switches enable the COBOL switches 0-8 that you defined in the Special-Names paragraph of your program (see your Language Reference for details). You can specify these switches in any order, but each individual switch must be preceded by a sign.
Implements file handling and status codes according to the particular ANSI standard for which your program was compiled.
Properties: Default: On Environment: 16-bit run-time systemsRemarks: If your program was compiled with the ANS85 directive, ANSI'85 file status values are returned. If switch A is off, ANSI'74 status values are returned.
Disables the display of trailing spaces by causing DISPLAY ... UPON CONSOLE statements to strip off any trailing spaces in the data item being displayed before outputting the data to the screen.
Properties: Default: On Environment: 16-bit run-time systemsRemarks: This switch provides compatibility with earlier COBOL systems from Micro Focus. When this switch is off, the trailing spaces are included in the display, as required by the ANSI COBOL Standard.
Causes the record pointer to be updated past any locked record encountered when using the READ NEXT statement.
Properties: Default: Off Environment: AllRemarks: Set the B switch for indexed sequential files open INPUT or I-O. Set the B1 switch for indexed sequential files open INPUT. Setting either of these switches permits a file to be sequentially read, even if another process has records locked in that file.
A file status of "locked record" is returned when a locked record is read when the B switch is set; a file status of "00" is returned when a locked record is read when the B1 switch is set.
Note: This switch also affects relative and record sequential files when your program is compiled with the CALLFH directive set.
Changes the sort algorithm used by the run-time system to one which is more suitable for dealing with huge sorts.
Properties: Default: Off Environment: 16-bit run-time systemsRemarks: Normally sorts are optimized to make use of all free memory. This is faster for small sorts. However, when performing a sort on data which is many times the size of free memory, this optimization requires that you have free disk space which is at least twice the size of the data records being sorted.
Setting the B2 switch on optimizes disk usage during a sort so that you only require free disk space which is roughly equal to the size of the data being sorted. Moreover, because less paging to disk occurs, it speeds up large sorts.
Enables the use of screens longer than the traditional 25 lines.
Properties: Default: Off Environment: 16-bit run-time systems.Remarks: This switch is available for use only with the shared run-time system, which by default treats all screens as 25 lines long. The static linked system always handles screens of any length.
The screen width cannot be altered; only screens 80 columns wide are supported.
Enables the run-time system to execute with any screen mode or size.
Properties: Default: Off Environment: 16-bit run-time systems.Remarks: Most system software (for example Animator) does not function correctly using screens of more or less than 80 columns. Enhanced accept/display operations function with any screen size.
Disables the creation of a COBOL text window for Presentation Manager applications.
Properties: Default: Off Environment: 16-bit run-time systemsRemarks: Specifying +C2 disables the creation of a COBOL text window for Presentation Manager applications. However, if a run-time system error occurs with this switch set, a text window displaying the error message text is created. This provides compatibility with previous releases of this COBOL system.
This switch does not have any effect running under Windows.
Forces the screen in 43-line mode on an EGA or VGA monitor, or with the default window under Windows.
Properties: Default: Off Environment: 16-bit shared run-time system.Remarks: The original screen mode is restored upon return to the operating system.
If you have set up program items for COBOL components under Windows, setting this switch causes the components to start in 43-line mode.
You must set the +C switch with the +C4 switch.
See also: C switch.
Forces the screen in 50-line mode on an EGA or VGA monitor, or with the default window under Windows.
Properties: Default: Off Environment: 16-bit shared run-time system.Remarks: The original screen mode is restored upon return to the operating system.
If you have set up program items for COBOL components under Windows, setting this switch causes the components to start in 50-line mode.
You must set the +C switch with the +C5 switch.
See also: C switch.
Invokes the standard ANSI COBOL Debug module.
Properties: Default: Off Environment: AllRemarks: See your Language Reference for a description of the Debug facilities. This switch must be set on the command line.
Example:
The command:
myprog (+D)
loads the program myprog from drive b: with the standard ANSI COBOL Debug
module invoked.
Provides compatibility with the method of searching for .dll files on OS/2 as used by Micro Focus COBOL systems before V3.1.
Properties: Default: Off Environment: 16-bit run-time systems on OS/2Remarks: When an application causes the run-time system to try to load a .dll program and the file is not specified with a fully qualified path name, OS/2 tries to locate the program from the given base-name by searching directories specified in LIBPATH. Before COBOL V3.1, the RTS also searched for the file in the directories specified in the COBDIR environment variable.
Specifying +D1 causes the RTS to search for .dll files in the directories specified in the COBDIR environment variable in addition to OS/2 searching in the directories specified in LIBPATH. The effect is exactly the same as in earlier products.
Disables run-time system error 177 ("Attempt to cancel program failed") when a cancel of a COBOL DLL fails.
Properties: Default: Off Environment: 16-bit shared run-time system on OS/2Remarks: If the run-time system encounters an error when it tries to cancel a COBOL Dynamic Link library (DLL) on OS/2, it issues error 177. Setting this switch causes the RTS to ignore the error and logically cancel the DLL.
Executes intermediate code which contains S-level syntax-check errors.
Properties: Default: Off Environment: 16-bit shared run-time systemRemarks: If you try to run intermediate code programs which contain S-level compiler errors when this switch is set to off, you receive a run-time system error. See your Error Messages for full details of these errors.
Specifies in bytes the size of the stack to be used to handle signals.
Properties: Default: /E2560 Environment: 16-bit shared run-time system on OS/2Remarks: Under normal circumstances you do not need to change the size of the stack used to handle signals. However, if your application does require more stack space than the default for handling signals you can increase its size using this switch.
See also: /S switch.
Checks all numeric items for valid numeric data.
Properties: Default: On Environment: AllRemarks: If the data is not valid, run-time system error 163 ("Illegal character in numeric field (fatal)") is produced. Setting this switch to off suppresses this checking.
Checking for valid numeric data can also be enabled in generated code by specifying the CHECKNUM directive. For such programs, setting this switch to off (-F) still disables the run-time system error.
Invalid data is handled differently by intermediate and native code, and by this COBOL system on other environments and different versions of this COBOL system. So, we recommend that you enable numeric field checking while you are developing your program.
If you receive run-time error 163, we recommend that you adjust your code so that no invalid data is used. You can locate the invalid numeric data in your code by setting the +F switch on and then animating your program until RTS error 163 is detected. See the chapter "Animator" for details on animating programs.
If you are not able to correct your code, you might want to use one or more of the following Compiler directives to resolve invalid data in numeric fields:
See also:
BADSIGNS Compiler Directive
CHECKNUM Compiler Directive
HOST-NUMCOMPARE Compiler Directive
HOST-NUMMOVE Compiler Directive
SIGNCOMPARE Compiler Directive
SPZERO Compiler Directive
Specifies the maximum number of files allowed to be open at a time.
Properties: Default: The default for the operating system. Environment: 16-bit shared run-time system.Remarks: You cannot specify a limit lower than 20.
On DOS and Windows the maximum allowed is 255. If you specify a number larger than 255, 255 is used instead. The default is specified by the FILES parameter in your DOS config.sys file.
On OS/2 the default is 255.
Forces all buffers to be 512 bytes.
Properties: Default: Off Environment: 16-bit run-time systemsRemarks: Normally, files opened for random access use 512 byte buffers; however, those opened for sequential access use 4K buffers. Setting this switch to on is useful if memory is at a premium, for example during animation; however, this can impact performance.
Sets the maximum number of 64K segments that is to be used for heap space on OS/2.
Properties: Default: /H384 Environment: 16-bit run-time systems on OS/2.Remarks: The default of /H384 means that 24M of heap space is available. The run-time system pages if the limit set by this switch is exceeded.
Changes the order in which the run-time system searches for program files.
Properties: Default: Off Environment: 16-bit shared run-time systemRemarks: Normally, the run-time system searches for program files in the order: .gnt, .int, .lbr . Setting this switch to on changes the search order to: .int, .gnt, .lbr .
Redirects run-time system errors to STDERR
Properties: Default: Off Environment: 16-bit shared run-time system on DOS and OS/2Remarks: The I2 switch is only enabled when used in conjunction with the +S5 switch.
If set off run-time system error messages are sent to STDOUT (standard output). If set on the error messages are sent to STDERR (standard error).
On OS/2 messages sent to STDERR can be redirected using the "2>" operator on the command line.
This switch has no effect when running on Windows.
See also: S5 switch.
Enables the use of old keyboard BIOS calls.
Properties: Default: Off Environment: 16-bit run-time systems.Remarks: Setting the K1 switch to on enables the COBOL system to be used on a new IBM PC keyboard in conjunction with a keyboard resident program which knows only about the old IBM PC keyboard BIOS routines.
Enables the use of extended keyboard BIOS calls.
Properties: Default: Off Environment: 16-bit run-time systems.Remarks: Setting the K2 switch to on enables the COBOL system to be used on a new extended IBM PC keyboard in conjunction with a keyboard resident program which knows only about the old IBM PC keyboard BIOS routines.
When on, causes a new copy of the command processor to be loaded when the Shift,Ctrl and Break keys are held down simultaneously.
Warning! If you use this switch and enter the new command shell you should be very careful about which command you use.
Properties: Default: Off Environment: 16-bit shared run-time systemRemarks: The K3 switch should be used with caution; if a disk clean-up facility (for example, CHKDSK /F) is used while in the new command shell and the application had any open files when the new command processor was loaded, the file system can become corrupted.
The K3 switch is turned on automatically in the COBOL development environments such as Workbench and Professional COBOL.
Causes run-time system error messages to stay on the screen until a key is pressed.
Properties: Default: Off Environment: 16-bit shared run-time systemRemarks: This is useful in batch runs where you want to know if any program terminates with a run-time system error message, or in a system that displays menus, where RTS error messages can sometimes be quickly overwritten.
Causes any critical I/O errors (for example "Disk drive door not closed") to return control immediately to the user program with an appropriate file status or error
Properties: Default: Off Environment: 16-bit run-time systems.Remarks: Usually, these conditions make the program pause with a message enabling the user to Abort, Retry, Fail or Ignore the error. Setting the L switch on suppresses this message so that all error handling can be controlled by the application.
Disables the interactive popup window that appears when an exception error occurs while running on OS/2 or Windows.
Properties: Default: Off Environment: 16-bit run-time systems.Remarks: Instead of the interactive popup window, a general OS/2 or Microsoft Windows error message is displayed and control is returned to the operating system prompt without any user intervention.
Determines the character(s) to be used as the record terminator when reading a line sequential file.
Properties: Default: Off Environment: 16-bit run-time systems.Remarks: When off (-L2), x"0A" is taken as the record terminator. This provides compatibility with COBOL for UNIX.
When on (+L2), x"0D0A" is taken as the record terminator. This provides compatibility with earlier versions of this system, correctly reading files written using a WRITE ... AFTER ADVANCING statement.
This switch only affects read operations and not write operations.
Enables the COBOL system to determine the size of sequential or relative files created by Micro Focus LEVEL II COBOL, which are padded out to a 128-byte boundary with x"1A" characters.
Properties: Default: Off Environment: 16-bit run-time systemsRemarks: You must set this switch to handle sequential or relative files created using Micro Focus LEVEL II COBOL.
Changes the way the RTE searches for subprograms.
Properties: Default: On Environment: 16-bit shared run-time systemRemarks: When this switch is on, the RTE searches for subprograms in, first, the directory from which the calling program was loaded, and then the directories specified in the environment variable COBDIR.
When this switch is off, subprograms are searched for first in the current directory and then in the directories specified in COBDIR.
Makes the command.com transient area available for use by the application.
Warning! Setting this switch prevents the last command entered from being saved in the buffer; therefore, you are unable to use the standard DOS command line editing facility.
Properties: Default: Off Environment: 16-bit shared run-time system on DOS.Remarks: Using this switch increases memory by 21K on DOS 3.3 and by 28K on DOS 4.x and above.
We recommend that you do not set this switch if you are running your application from a batch file.
Prevents the RTE from paging out procedure code of an active program.
Properties: Default: Off Environment: 16-bit shared run-time systemRemarks: When this switch is off, the RTE memory manager, when short of free memory, discards procedure code of currently active programs. Discarded code is reloaded when it next needs to be executed. This can cause "out of memory" errors if there is no room to reload a program when a subprogram it has called returns to it. If this switch is on, procedure code of currently active programs is not discarded; thus you never get a "memory full" error when a subprogram returns. Applications using this switch should use the ON EXCEPTION/OVERFLOW syntax to check for memory being full when a subprogram is called.
Specifies, in multiples of 128, the number of heaps available for each application.
Properties: Default: /M3 (That is, 3 x 128 heaps.) Environment: 16-bit shared run-time system.Remarks: The default number of heaps made available for each application is 384. System software uses some of the heaps made available to an application, so the number of heaps usable is slightly less than the number specified.
You might need to increase the number of heaps when animating large applications.
The only possible settings of this switch are: /M1, /M2, /M3 and /M4.
Enables null insertion for all line sequential files in your program.
Properties: Default: On Environment: AllRemarks: This switch is especially useful if the format of your files is incompatible with this version of COBOL.
Setting this switch to on means that when a program writes records to a line sequential file with a record containing control characters (that is, all characters with ASCII codes less than or equal to x"1F"), the system adds a null character (x"00") before each control character. Similarly, on reading a record from a line sequential file, these null characters are stripped from the control characters.
Setting this switch affects only the physical storage of data in a line sequential file. Records written with one setting and read back with the same setting are returned in exactly the same way. However, if you try to read a file with one setting which was written with the other setting, the results are unpredictable.
Setting this switch off enables control characters to be written and read in the same way as other characters.
When the N switch is on:
Note:
Control characters depend on the operating system. Their hexadecimal values
are always less than x"1F". CR (x"0D"), LF (x"0A"), TAB (x"09"), NUL (x"00"),
and EOF (x"1A") are all recognized control characters on DOS, Windows and
OS/2.
When the N switch is off:
Example:
The command:
a:myprog (-n)
loads the program myprog from drive a:. It also specifies that, in line
sequential files, all characters less than or equal to x"1F", except for Tab
and the file control characters, are treated as data. Null is not inserted
before data characters less than x"1F" on output.
Enables run-time system error 48 ("Attempt to divide by zero").
Properties: Default: On Environment: All run-time systemsRemarks: A program compiled with CHECKDIV"OSVS", CHECKDIV"VSC2" or CHECKDIV"COBOL370" set produces run-time system error 48 upon an attempt to divide by zero. Setting this switch off (-O) disables this error, causing the program to continue with undefined results. This switch has no effect on programs that were not compiled using one of the above directive settings.
See also: CHECKDIV Compiler Directive.
Causes the DOS shared run-time system to perform its printer I/O by calling a standard DOS routine instead of by invoking standard BIOS routines.
Properties: Default: Off Environment: 16-bit shared run-time system on DOSRemarks: This switch is particularly useful when accessing a printer attached to a local area network or when accessing slow local printers which keep timing out because their buffers are full.
With the P switch set, the system cannot detect whether the printer is available when it is opened; only when an attempt is made to write to it.
Sounds the system bell by using a call to the BIOS.
Properties: Default: Off Environment: 16-bit run-time systemsRemarks: Normally, the system sounds the bell by accessing the hardware directly. On some clone machines this does not work, and the bell can only be sounded via the BIOS. Setting this switch makes the system sound the bell via the BIOS.
Enables support for logical cancels in the run-time system.
Properties: Default: Off Environment: 16-bit shared run-time systemRemarks: By default the CANCEL statement physically cancels a program from memory. A subsequent call to that program requires the program to be physically reloaded from disk.
If you specify +P2, the memory for a program is not released when it is canceled, though the run-time system marks it as logically canceled. So, a subsequent call to that program does not need it to be reloaded from disk; the RTS simply reinitializes the copy of the program already in memory.
Specifies the address of the parallel port to which the security key is attached.
Properties: Default: /P956 Environment: 16-bit run-time systemsRemarks: The system first looks for a security key in the port specified by this switch, the default being the standard IBM port address. If a security key is not found at this address, addresses 632 and 888 are checked.
You might need this switch if you are using a clone machine that has nonstandard parallel port addresses.
Repeats the read operation on a record that is found to be locked until the record becomes available.
This switch is maintained for compatibility with older COBOL systems. Use the RETRYLOCK Compiler directive instead. The RETRYLOCK directive gives the same functionality, and creates a program that is portable to other environments. The R switch will be removed in a future version of this COBOL system.
Warning! This feature makes possible a deadly embrace. One program might have locked record A and be trying to read record B, while another program has locked record B and is trying to read record A. Should this happen you will probably have to reboot your system.
Properties: Default: Off unless the program is compiled with the RM directive. Environment: 16-bit run-time systemsRemarks: This affects files of any organization which are open for input or I-O and which have no file status item declared,
If this switch is set to off and a read is tried on a record which is locked, the read is not tried again.
This switch is overridden by the RETRYLOCK Compiler directive.
When set, indicates that the system need not wait for the vertical retrace signal to be active before accessing the video RAM.
Properties: Default: Off Environment: 16-bit run-time systemsRemarks: This is a specialist switch for use only on IBM compatible PC's where the need for protection of the video RAM is different to that on a standard IBM PC, AT or PS/2.
If S2 and S3 are both off, the system determines the setting automatically. On some machines it might choose the wrong setting.
When set, indicates that the system must wait for the vertical retrace signal to be active before accessing the video RAM.
Properties: Default: Off Environment: 16-bit run-time systemsRemarks: This is a specialist switch for use only on IBM compatible PC's where the need for protection of the video RAM is different to that on a standard IBM PC, AT or PS/2.
If S2 and S3 are both off, the system determines the setting automatically. On some machines it might choose the wrong setting.
Enables ansi.sys-compatible console I/O.
Properties: Default: Off Environment: 16-bit shared run-time system on DOS.Remarks: This function is achieved by the run-time system forcing all ACCEPT FROM/DISPLAY UPON CONSOLE statements to be executed such that I/O to and from the screen and keyboard can be redirected by using the ">" and "<" operators on the DOS or OS/2 command line.
This switch has no effect when running under Windows.
Changes default behavior of attributes for DISPLAY ... UPON CRT of non-Screen Section items.
Properties: Default: Off Environment: 16-bit run-time systemsRemarks: When attributes have been written to a screen area with a DISPLAY statement using a data item that is not in a Screen Section, a DISPLAY statement with no attribute specification uses, by default, the attributes already existing in that area. If the +S6 switch is specified at run time, normal attributes are used instead.
When attributes have been written to an area on the screen with a DISPLAY of a Screen Section item, a subsequent DISPLAY in that area with no attribute specified inherits those attributes regardless of the setting of the +S6 switch.
Specifies, in bytes, the default size of the PERFORM/CALL stack.
Properties: Default: /S8192 Environment: 16-bit shared run-time system.Remarks: We recommend that you do not set a stack size larger than 32k (/S32768).
You should always ensure that the stack size you set is the minimum required by your application.
See also: /E Switch.
Enables insertion of tab characters in all line sequential files.
Properties: Default: Off Environment: AllRemarks: This switch is especially useful if the format of your files is incompatible with this version of the COBOL system.
On output to disk, multiple spaces before a tab stop position are written as one tab character. The T switch does not affect any trailing spaces as these are not part of the line sequential record, and they are removed on output. Tab positions are every 8 character positions (for example, 9, 17, 25) and cannot be changed.
On input, tab characters are always expanded to spaces to the next position, regardless of the setting of the T switch.
With this switch set to off, all spaces in a line sequential file are written to disk as space characters.