|
This SQL statement can be executed in the following ways: |
Through the CA Datacom Datadictionary Interactive SQL Service Facility (interactive) |
In an application program prepared using a CA Datacom/DB SQL Preprocessor (embedded) |
By using CA Dataquery (SQL & Batch Modes) |
|---|---|---|---|
|
PREPARE |
|
YES |
|
Note: YES indicates a valid execution method for this statement.
The PREPARE statement creates an executable SQL statement from a character string form of the statement. The executable form is called a prepared statement. The character string form is called a statement string.
Prepared statements are deleted when the unit of recovery in which they were prepared ends, except that a select-statement whose cursor is declared with the WITH HOLD option persists (if the cursor is open) over a COMMIT WORK.
No authorization is required to preprocess a PREPARE statement, that is, there is no security check of the PREPARE statement or its contents at preprocessor time. At execution time, however, the statement's contents are checked against the security conditions that are valid for that program.
Prepared statements can be referenced by these statements:
A prepared statement can be executed multiple times.
Following is the syntax diagram for the PREPARE statement:
►►─ PREPAREstatement-name ────────────────────────────────────────────────────► ►─┬──────────────────────────────────────────────┬─ FROM ────────────────────► └─ INTOdescrpt-name ─┬───────────────────────┬─┘ └─ USING ─┬─ NAMES ◄ ─┬─┘ ├─ LABELS ──┤ ├─ ANY ─────┤ └─ BOTH ────┘ ►─┬─ string-expression ─┬────────────────────────────────────────────────────►◄ └─ host-variable ─────┘
|
Copyright © 2014 CA.
All rights reserved.
|
|