Problem:
In an unix environment parameters are retrieved with the DISPLAY UPON ARGUMENT-NUMBER as numbers 2, 3, and 4, (with argument 1 being the program name and path).
It appears in the Windows environment they correspond to numbers 1, 2, and
Is there some compiler/runtime flag that would emulate the unix environment?
Resolution:
Use the run time tunable arguments_are_initial=TRUE
according to the documentation:
This affects the COBOL command line arguments returned from the syntax ACCEPT ... FROM ARGUMENT-NUMBER and ACCEPT ... FROM ARGUMENT-VALUE.
example: run myapp arg1 arg2 arg3
Returns myapp as argument 0 when this tunable is set to FALSE (default).
When the tuneable is set to TRUE the trigger name (run) is returned as argument 0 and myapp as argument 1. Therefore the actual passed parameters would be 2,3,& 4 as in the unix environment.
syntax: set arguments_are_initial=TRUE
NOTE: This run-time tunable should be specified in a run-time configuration file. The location and name of this file is covered by the COBCONFIG_ environment variable.