SQL Supplement for H-Series RVUs
SQL/MP Programming Manual for COBOL
HP NonStop SQL Supplement for H-Series RVUs—529446-005
1-22
Running the HP COBOL Compilers
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 COBOL Manual for TNS and TNS/R
Programs.
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.
By default, the compiler generates an object file, RUNUNIT, qualified by the default
system, volume, and subvolume names. To name the object file, specify a target file on
the command line. For example, this command generates an object file, MYPROG:
NMCOBOL /IN MYSRC/ MYPROG; SQL
For native-compiled SQL/MP programs, the SQL directive is not accepted in the
source code. You must specify the SQL directive on the compiler command line as the
previous example shows.
The NMCOBOL compiler does not automatically invoke the linker. You must specify
the RUNNABLE directive either in the source code or on the compiler command line
for the NMCOBOL compiler to call the linker to produce an executable object file
(loadfile):
NMCOBOL /IN MYSRC/ MYPROG; SQL; RUNNABLE
If you specify the RUNNABLE directive but not the CALL-SHARED or SHARED
directive, the NMCOBOL compiler automatically links the program by using the
COBOLFE process and the nld utility to produce a non-PIC loadfile.
If you specify the RUNNABLE and CALL-SHARED directives, the NMCOBOL compiler
automatically links the program by using the ld utility to produce a PIC loadfile:
NMCOBOL /IN MYSRC/ MYPROG; SQL; RUNNABLE; CALL-SHARED
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 by using its process identification number or by
typing STOP.
Note. Embedded SQL/MP programs are disallowed in user libraries, shared run-time libraries
(SRLs), and dynamic-link libraries (DLLs). When compiling embedded SQL/MP programs, do
not use the SHARED directive, which produces a DLL.










