SQL/MP Programming Manual for COBOL

Program Execution
HP NonStop SQL/MP Programming Manual for COBOL529758-003
7-3
Using the CREATEPROCESS Routine
program-file
is the name of the SQL program file. For an explicit RUN command, TACL qualifies
a partially qualified file name by using the =_DEFAULTS DEFINE. For an implicit
RUN command, TACL searches for program-file in the TACL
#PMSEARCHLIST variable.
run-option
is a RUN command run option as described in the TACL Reference Manual.
param-set
is one or more parameters to pass to the new process.
For example, this RUN command runs the program file, SQLPROG, and specifies the
NAME, OUT, and NOWAIT run options:
RUN sqlprog / NAME $sqlrun, OUT $s.#sqllist, NOWAIT /
This RUND command runs the program file, $DISK2.SQL.SQLPROG, under the
control of the Inspect debugger:
RUND $disk.sql.sqlprog
For additional information about the RUN command, see the TACL Reference Manual.
Using the CREATEPROCESS Routine
To execute an SQL program file from a COBOL program, use the COBOL
CREATEPROCESS routine. The CREATEPROCESS routine starts a new process by
using the parameters you supply and (optionally) sends process-creation messages
altered by COBOL saved message utility (SMU) routines to the new process.
To call the CREATEPROCESS routine, use the COBOL ENTER statement. However,
do not include the TAL keyword after the ENTER keyword.
Example 7-1
on page 7-4 illustrates a CREATEPROCESS routine. The user enters
values for NEW-PROGRAM, NEW-OPTION, and NEW-CPU.