>>-.---.--.----.-COMMAND-LINE-LINKAGE----------->< +-/-+ +-NO-+
None.
Default: | NOCOMMAND-LINE-LINKAGE |
Phase: | Syntax check |
$SET: | Initial |
IDE equivalent | None |
When using this directive, the command line will be passed to the main program using the following parameter structure:
Linkage section. 01 CommandLinePass. 03 CommandLineLen pic 9(4)comp. 03 CommandLine pic x(256).
CommandLineLen contains the length of the parameters being passed and CommandLine contains the actual arguments being passed. The following is a simple example of it in use:
... Procedure Division Using CommandLinePass. Display "Command Line = " CommandLine(1:CommandLineLen). ...
This directive can only be used on the top-level program in a COBOL run-unit; it will have no effect in cases where it is not specified in the top-level program.