SQL Supplement for H-Series RVUs
SQL/MP Programming Manual for COBOL
HP NonStop SQL Supplement for H-Series RVUs—529446-005
1-23
Running the HP COBOL Compilers
If you do not specify the RUNNABLE directive when compiling the source program,
you must invoke the linker directly to link the object files. For more information, see
The nld or ld Utility on page 1-34.
Lastly, 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 1-39.
Running the ECOBOL Compiler in the Guardian Environment
To run the ECOBOL compiler in the Guardian environment of a TNS/E system, enter
the ECOBOL 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/E Programs.
For example, this command invokes the ECOBOL compiler and specifies a source file,
MYSRC, which contains embedded SQL statements and directives:
ECOBOL /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:
ECOBOL /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 ECOBOL 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 ECOBOL compiler to call the eld utility to produce an executable PIC loadfile:
ECOBOL /IN MYSRC/ MYPROG; SQL; RUNNABLE
Note. Run the linker before SQL compiling the program.
ECOBOL /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 dynamic-link libraries (DLLs). When
compiling embedded SQL/MP programs, do not specify the SHARED directive, which
produces a DLL.










