Previous Topic: DROP VIEWNext Topic: EXECUTE


END DECLARE SECTION

The END DECLARE SECTION statement is a precompiler directive that notifies the precompiler the SQL declare section has ended. You can use this statement only in SQL that is embedded in a program.

Authorization

None required.

Syntax
►►── END DECLARE SECTION ─────────────────────────────────────────────────────►◄
Parameter
END DECLARE SECTION.

Notifies the precompiler that the SQL declare section has ended. An SQL declare section contains the definition of one or more host variables.

Example

Beginning and Ending an SQL Declaration Section

In this example, BEGIN DECLARE SECTION begins an SQL declare section and END DECLARE SECTION ends it. The SQL declare section contains the definition of five host variables.

WORKING-STORAGE SECTION.
 .
 .
 .
 EXEC SQL BEGIN DECLARE SECTION END-EXEC
   01  HV-EMP-ID           PIC S9(8)     USAGE COMP.
   01  HV-EMP-LNAME        PIC X(20).
   01  HV-SALARY-AMOUNT    PIC S9(6)V(2) USAGE COMP-3.
   01  HV-PROMO-DATE       PIC X(10).
   01  HV-PROMO-DATE-I     PIC S9(4)     USAGE COMP.
 EXEC SQL END DECLARE SECTION END-EXEC
More Information