SQL/MP Programming Manual for COBOL

HP NonStop SQL/MP Programming Manual for COBOL529758-003
7-1
7 Program Execution
This section describes the execution of a COBOL program containing embedded SQL
statements and directives in the OSS environment.
Topics include:
Required Access Authority
Using DEFINEs on page 7-2
Entering the TACL RUN Command on page 7-2
Using the CREATEPROCESS Routine on page 7-3
Using the CLU_PROCESS_CREATE_ Routine on page 7-4
Running a Program in the OSS Environment on page 7-5
Running a Program at a Low PIN on a D-Series or Later Node on page 7-5
Determining Compatibility With the SQL Executor on page 7-7
Required Access Authority
To execute an SQL program file, you (or the creator process if you use the COBOL
CREATEPROCESS routine) must have this access authority:
Read and execute authority to the SQL program file
Read authority to the catalog in which the program is registered
Read authority to any catalogs in which tables or views used by the program are
registered for SQL statements that require automatic SQL recompilation
For an embedded SQL statement (either static or dynamic) to access and operate on a
database object, such as a table or view, the process started by the program must
have specific privileges associated with it. The privileges of both the process access ID
(PAID) and group list are evaluated to determine if a process can be granted access to
a database object. The group list is always associated with the creator access ID
(CAID), which represents the user who starts the process. The PAID depends on the
PROGID setting.
If the program owner does not enable the PROGID attribute for the program file, the
PAID will be the same as the user ID of the process creator (that is, the CAID). When a
user executes the program, the process uses the privileges of the process creator and
accesses only resources to which the process creator has access.
If the program owner enables the PROGID attribute for the program file, the PAID will
be the same as the user ID of the program owner. When a user executes this program,
the process uses the privileges of the program owner and accesses only the resources
to which the program owner has access. PROGID programs enable one user to