This statement is the starting delimiter for a host variable declaration block.
Embedded Mode P |
Dynamic Mode |
Interactive Mode |
SQL application programs need to retrieve and provide values to and from Adabas SQL Gateway Embedded SQL during runtime. This is achieved by using host variables which are specified in embedded SQL statements. During compilation, the nature of the host variables has to be known. To identify the relevant host variables they must be declared in a special section. This section is delimited by the BEGIN DECLARE SECTION and END DECLARE SECTION statements. These statements are always paired and can not be nested. The host variable declarations must be specified between the two statements and more than one of these sections are permitted. The statement does not result in an update of the SQLCA.
The positioning of the statement must conform to the rules governing the positioning of host variable declarations with the host applications. At least one host variable should be declared in such a block.
Any host variable referenced within an embedded SQL statement must have been declared with a host variable declaration section. Structures are not permitted in this context.
Example
The following example shows the start of the host variable declaration section.
BEGIN DECLARE SECTION
char a
END DECLARE SECTION;