(Contents)(Previous)(Next)

COBOL Precompiler Include Files

The include files are stored in the file directory "%dbroot%\incl". Their names begin with 'CSQL', e.g., 'CSQLCA'. These files must not be modified because they are required for an application to run. The following include files may also be used as copy elements by the user:

CSQLDA contains the elements of the SQLDA with 300 SQLVAR entries. It can be used, for example, in a declaration in the following way:

01 SQLDA1.

COPY "csqlda".

CSQL1DA contains the main structure of the SQLDA (without SQLVAR entries)

CSQL2DA contains the SQLVAR elements. The include files can, for example, be used in the following way:

01 SQLDA2.

COPY "csql1da".

02 SQLVAR OCCURS 10 TIMES.

COPY "csql2da".

Thus the number of SQLVAR entries is defined within the program.

The following include files are used for ORACLE compatibility.

CSQLOR1 contains SET statements for assigning the addresses required within the bind descriptor (BNDDSC). This include file must be inserted into the Procedure Division before the first SQL statement.

CSQLOR2 contains the declaration of the bind descriptor (BNDDSC) for up to 300 entries.

CSQLOR3 contains the declaration of the select descriptor (SELDSC) for up to 300 entries.

CSQLOR4 contains the SET statements for assigning the addresses required within the select descriptor (SELDSC). This include file must be inserted into the Procedure Division before the first SQL statement.

CSQLADR contains a COBOL subroutine for determining a variable's address. This subroutine must be called in the following way:

CALL "sqladr" USING <variable name> <pointer variable>


(Contents)(Previous)(Next)