Microsoft KB Archive/61351

Summary of Run-Time Command-Line Parameters in COBOL

PSS ID Number: Q61351 Article last modified on 05-02-1990

3.00 3.00a | 3.00 3.00a MS-DOS | OS/2

Summary: When a COBOL program is run, COBOL allows you to use a set of command-line switches to control program operation. The available switches are: 1. The numbers 0 through 8 2. The letters A, B, D, F, G, N, and T For more detailed information on run-time command-line switches, refer to Page 5-1 in the “Microsoft COBOL Compiler 3.0: Operating Guide.” This information applies to Microsoft COBOL versions 3.00 and 3.00a for MS-DOS and MS OS/2.

More Information: The switches are specified on the command line after the program name, but before any other command-line parameters. The switches are listed one after the other, inside parentheses, with a “+” indicating the switch is to be set on (as in +A) and a “-” indicating the switch is to be set off (as in -R). For example COBPROG (+A -R) Param1 where: 1. COBPROG is the name of the executable COBOL program. 2. +A is a switch specifying ANSI 85 file handling. 3. -R disables reading locked records until they are available. 4. Param1 is a command-line parameter required by the COBOL program. Note: Both alphabetic and numeric switches remain set when COBOL CALLed modules are processed. For more information on programmable switches, refer to the “Microsoft COBOL Compiler 3.0: Language Reference Manual.” The switches may be any of the following: A digit between 0 and 8 (inclusive), that corresponds to the programmable switches included in the program. For more information on how to use these switches, query on the following words: COBOL AND invocation AND switches -A Turns off ANSI 85 file handling and status codes when the program was compiled with the ANS85 directive. (Note: The +A switch can be used but serves no purpose). B Undocumented switch enabling/disabling skipping locked records encountered when using a READ NEXT. For more information, query on the following words: COBOL AND undocumented AND switches D Enables or disables the ANSI COBOL debug module. F Enables or disables the checking of valid numeric data. G Allows you to reduce the size of buffers used by I/O operations. N Enables or disables null insertion for line sequential files. R Enables or disables the mechanism for reading locked records until they become available. T Enables or disables tab insertion upon output for line sequential files.

Copyright Microsoft Corporation 1990.