SQL/MP Programming Manual for COBOL

Explicit Program Compilation
HP NonStop SQL/MP Programming Manual for COBOL529758-003
6-13
Running HP COBOL Compilers in the Guardian
Environment
Running HP COBOL Compilers in the Guardian Environment
To run an HP COBOL compiler in the Guardian environment, see:
Running the COBOL85 Compiler in the Guardian Environment
Running the NMCOBOL Compiler in the Guardian Environment on page 6-14
Running the COBOL85 Compiler in the Guardian
Environment
To run the COBOL85 compiler in the Guardian environment, enter the COBOL85
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 COBOL85 compiler and specifies a source
file, MYSRC, which contains embedded SQL statements and directives:
COBOL85 /IN MYSRC/
The source file can be a disk file, terminal, magnetic tape unit, or process.
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:
COBOL85 /IN MYSRC/ MYPROG
To compile an embedded SQL program, you must specify the SQL directive, which
tells the compiler to expect SQL statements in the compilation unit. If you do not
specify the SQL directive before the first Identification Division in the source program,
you must specify it on the compiler command line. For example, this SQL directive tells
the compiler to expect embedded SQL statements, to accept only version 1 features of
SQL/MP, and to include an SQL map in the listing file, $VOL1.SUBVOL.LST:
COBOL85 /IN MYSRC, OUT $VOL1.SUBVOL.LST/ MYPROG; SQL (RELEASE1,
SQLMAP)
For the syntax of the SQL directive, see the SQL Compiler Directive
on page 6-7.
When compiling an embedded SQL program using the COBOL85 compiler, you can
optionally use the SQLMEM directive to cause the compiler to declare SQL data
structures in either the Working-Storage Section or the Extended-Storage Section of
COBOL85 /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).