Compaq AAQ2G1FTK Marine Radio User Manual


 
Developing Compaq COBOL Programs
1.2 Developing Programs on Tru64 UNIX
Compaq recommends that you not name a Compaq COBOL program ‘‘main.’’
If you have a C routine named ‘‘main,’’ you can work around this problem by
having the ‘‘main’’ routine directly call the Compaq COBOL initialization routine,
cob_init. The cob_init routine interface (in C) is as follows:
void cob_init ( /* init the RTL */
int argc, /* argument count */
char **argv, /* arguments */
char **envp /* environment variable pointers */ )
1.2.2 Compiling a Compaq COBOL Program on Tru64 UNIX
Compilation does the following for you:
Detects errors in your program syntax
Displays compiler messages on your terminal screen
Generates machine language instructions from valid source statements
Groups the instructions into an object module for the linker
ld
To compile your program, use the
cobol
command.
The COBOL Command Driver
The
cobol
command invokes a compiler driver that is the actual user interface to
the Compaq COBOL compiler. It accepts a list of command flags and file names
and causes one or more processors (compiler, assembler, or linker) to process each
file.
After the Compaq COBOL compiler processes the appropriate files to create