SQL/MP Programming Manual for COBOL

Explicit Program Compilation
HP NonStop SQL/MP Programming Manual for COBOL529758-003
6-14
Running HP COBOL Compilers in the Guardian
Environment
the program. For example, this command directs the compiler to declare SQL data
structures in the Extended-Storage Section:
COBOL85 /IN MYSRC/ MYPROG; SQL; SQLMEM EXT
For more information about the compiler directives, see the COBOL85 for NonStop
Systems Manual.
When you run the COBOL85 compiler, it automatically invokes the BINSERV process
of the Binder program, which validates and resolves references to other programs or
routines and produces a single object file. To invoke the Binder program separately,
use BIND. For more information, see The Binder Program on page 6-22.
After compiling and binding the object file, you can optimize the TNS object file for
execution on a TNS/R system by invoking the Accelerator. For more information, see
Acceleration of TNS HP COBOL Programs on page 6-23.
Finally, you must run the SQL compiler to generate SQL object code in the program
file. For more information, see Running the SQL Compiler in the Guardian Environment
on page 6-27.
Running the NMCOBOL Compiler in the Guardian
Environment
To run the NMCOBOL compiler in the Guardian environment, enter the NMCOBOL
command at the TACL prompt or from a TACL OBEY command file using this syntax:
For more information about the syntax, see the COBOL85 for NonStop Systems
Manual.
For example, this command invokes the NMCOBOL compiler and specifies a source
file, MYSRC, which contains embedded SQL statements and directives:
NMCOBOL /IN MYSRC/; SQL
The source file must be an EDIT file.
Note. Run the Binder program before SQL compiling the program.
Caution. Because the Accelerator invalidates SQL program files, run the Accelerator before
you explicitly SQL compile the program to avoid having to recompile.
NMCOBOL /IN source-file [, OUT [list-file]][, run-option].../
[ target-file ]
[, copy-library ]
[; compiler-directive ] ...
Note. To terminate a compilation in the Guardian environment, use the Break key to return to
the Command Interpreter and stop the process using its process identification number (PIN).