HPlogo ALLBASE/SQL COBOL Application Programming Guide: HP 3000 MPE/iX Computer Systems > Chapter 3 Embedding SQL Commands

Declaring Host Variables

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Variables used in SQL commands in the PROCEDURE DIVISION are known as host variables. All host variables used in a program must be declared in the FILE SECTION, the WORKING-STORAGE SECTION, or the LINKAGE SECTION of the DATA DIVISION. The declarations must appear between the two following SQL commands:



        EXEC SQL BEGIN DECLARE SECTION END-EXEC.

         .

         .  Host variables are declared here

         .  in COBOL data declarations.



        EXEC SQL END DECLARE SECTION END-EXEC.

For detailed information regarding host variables, see Chapter 4.

Feedback to webmaster