>>-----set arguments_are_initial=-.-TRUE-.----------->< +-FALSE+
TRUE | The COBOL command line arguments are the same as the initial ones passed to the run-unit by the operating system. When using
a trigger, such as
run
(Windows) or
cobrun
(UNIX), argument 0 is the trigger name and argument 1 is the name of the main COBOL program.
Set this tunable to TRUE for compatibility with Micro Focus Object COBOL Developer Suite V4.1 for UNIX and earlier. |
FALSE | The COBOL command line arguments do not contain any trigger name. Instead, argument 0 is always the name of the main COBOL
program.
When set to FALSE this tunable gives consistent results no matter how your application is packaged. |
Default: | FALSE |
IDE equivalent: | > Command Line Handling > Return trigger executable name as argument zero |
See the Language Reference for more details of the ACCEPT ... FROM ARGUMENT-NUMBER and ACCEPT ... FROM ARGUMENT-VALUE syntax. For details on building UNIX applications, see Building COBOL applications if using the IDE, or Compiling and Linking from the Command Line if using the command line/shell prompt.
If you are using a system executable to start your application, argument 0 is always the name of the executable (which, by default, is also the name of the main COBOL program), irrespective of the setting of this tunable.
For example, the command line:
myapp arg1 arg2
always returns myapp as argument 0, whereas the command line:
run myapp arg1 arg2
cobrun myapp arg1 arg2
returns myapp as argument 0 when this tunable is set to FALSE; when the tunable is set to TRUE the trigger name ( run (Windows) or cobrun (UNIX)) is returned as argument 0 and myapp as argument 1.