To run a COBOL program, you set environment variables,
issue the command to run the executable, and then correct any runtime
errors.
Procedure
- Make sure that any needed environment variables
are set.
For example:
- If the program uses an
environment variable name to assign a value
to a system file-name, set that environment variable.
- If
the program uses runtime options, specify their values
in the COBRTOPT runtime environment variable.
- Run the program: At the command line, either enter
the
name of the executable module or run a command file that invokes that
module. Include any needed program arguments on the command
line.
For example, if the command cob2
alpha.cbl beta.cbl-o gamma
is
successful,
you can run the program by entering gamma.
- Correct runtime errors.
You can use the debugger to examine the program state at the time of the errors.
Results
Tip: If
runtime messages are abbreviated or incomplete, the environment variables
LANG or NLSPATH or both might be incorrectly set.